Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
StudioScreenshotCapture
Inherits from: Instance → Object
Studio-only capture result that requires plugin security — not available in published experiences. Produced by CaptureScreenshot() and CapturePluginGui(). It holds the encoded image data together with the region and format used for the capture, and reports progress through BufferStatus.
The image is populated asynchronously. BufferStatus defaults to StudioCaptureBufferStatus.NotStarted, becomes StudioCaptureBufferStatus.Pending while capturing and encoding, StudioCaptureBufferStatus.Ready once the image is available, or StudioCaptureBufferStatus.Error if capture failed. Retrieve the image with GetBuffer(), read failure details with GetErrors(), and produce a resized copy with ScaleAsync().
Inherits from: Instance
Memory category: Instances
Tags: NotCreatable, NotReplicated
Properties
| Name | Type / Returns | Description |
|---|---|---|
| StudioScreenshotCapture.BufferFormat | StudioCaptureScreenshotFormat | The pixel format of the image data returned by GetBuffer(). |
| StudioScreenshotCapture.BufferStatus | StudioCaptureBufferStatus | Reflects the current state of the capture as its image data is produced. |
| StudioScreenshotCapture.OriginalSize | Vector2 | The size, in pixels, of the region available for capture from Position to the edge of the Studio view. |
| StudioScreenshotCapture.Position | Vector2 | The top-left corner, in pixels, of the captured region within the Studio view. |
| StudioScreenshotCapture.Resolution | Vector2 | The pixel dimensions of the captured image. |
| StudioScreenshotCapture.UICaptureMode | UICaptureMode | Indicates which user-interface layers were included in the capture. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.Archivable | boolean | Determines if an Instance and its descendants can be cloned using Instance:Clone(), and can be saved/published. |
| Instance.archivable | boolean | |
| Instance.Capabilities | SecurityCapabilities | The set of capabilities allowed to be used for scripts inside this container. |
| Instance.IsInSandbox | boolean | Indicates whether the instance is inside a sandboxed container. |
| Instance.Name | string | A non-unique identifier of the Instance. |
| Instance.Parent | Instance | Determines the hierarchical parent of the Instance. |
| Instance.PredictionMode | PredictionMode | Reflects the client-side prediction mode applied to the instance under server-authoritative physics. |
| Instance.RobloxLocked | boolean | A deprecated property that used to protect CoreGui objects. |
| Instance.Sandboxed | boolean | When enabled, the instance can only access abilities in its Capabilities list. |
| Instance.UniqueId | UniqueId | A unique identifier for the instance. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.ClassName | string | A read-only string representing the class this Object belongs to. |
| Object.className | string |
StudioScreenshotCapture.BufferFormat
The StudioCaptureScreenshotFormat the capture's image data is encoded in, and therefore the format of the buffer returned by GetBuffer(). Defaults to StudioCaptureScreenshotFormat.RGBA8, in which the buffer holds four bytes (red, green, blue, alpha) per pixel; when StudioCaptureScreenshotFormat.PNG, the buffer holds a PNG-encoded image. This property is read-only and reflects the Format requested when the capture was created.
| Field | Value |
|---|---|
| type | StudioCaptureScreenshotFormat |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
StudioScreenshotCapture.BufferStatus
The StudioCaptureBufferStatus describing where the capture is in its lifecycle. Defaults to StudioCaptureBufferStatus.NotStarted, is set to StudioCaptureBufferStatus.Pending while the image is being captured and encoded, becomes StudioCaptureBufferStatus.Ready once the image data is available, and becomes StudioCaptureBufferStatus.Error if the capture fails. Only when the value is StudioCaptureBufferStatus.Ready does GetBuffer() return image data; otherwise that method raises an error. This property is read-only.
| Field | Value |
|---|---|
| type | StudioCaptureBufferStatus |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
StudioScreenshotCapture.OriginalSize
The pixel size of the capturable region measured from Position to the bottom-right corner of the Studio view, computed as the screen resolution minus the capture position and clamped to be non-negative. It describes the source area before any cropping or scaling, as distinct from Resolution, which is the pixel size of the encoded image. This property is read-only.
| Field | Value |
|---|---|
| type | Vector2 |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
StudioScreenshotCapture.Position
The pixel offset of the top-left corner of the captured region from the top-left of the Studio view. It reflects the Position supplied when the capture was requested, defaulting to (0, 0) when none is given. This property is read-only.
| Field | Value |
|---|---|
| type | Vector2 |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
StudioScreenshotCapture.Resolution
The width and height, in pixels, of the encoded image held by the capture. It is set once the image has been captured and encoded (when BufferStatus becomes StudioCaptureBufferStatus.Ready), and for a capture produced by ScaleAsync() it equals the requested output size. This property is read-only.
| Field | Value |
|---|---|
| type | Vector2 |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
StudioScreenshotCapture.UICaptureMode
The UICaptureMode that determines which user interface is composited into the captured image. Defaults to UICaptureMode.All, meaning all UI is included, and reflects the UICaptureMode requested when the capture was created. This property is read-only.
| Field | Value |
|---|---|
| type | UICaptureMode |
| tags | ["ReadOnly","NotReplicated"] |
| security | {"read":"PluginSecurity","write":"PluginSecurity"} |
| thread safety | ReadSafe |
| category | Data |
| serialization | {"can_load":false,"can_save":true} |
Methods
| Name | Type / Returns | Description |
|---|---|---|
| StudioScreenshotCapture:GetBuffer | buffer | Returns the captured image data as a buffer in the capture's pixel format. |
| StudioScreenshotCapture:GetErrors | Array | Returns an array of error messages recorded during the capture. |
| StudioScreenshotCapture:ScaleAsync | StudioScreenshotCapture | Produces a new capture containing a resized copy of this capture's image. |
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance:AddTag | () | Applies a tag to the instance. |
| Instance:children | Instances | Returns an array of the object's children. |
| Instance:ClearAllChildren | () | This method destroys all of an instance's children. |
| Instance:Clone | Instance | Create a copy of an instance and all its descendants, ignoring instances that are not Archivable. |
| Instance:clone | Instance | |
| Instance:Destroy | () | Sets the Instance.Parent property to nil, locks the Instance.Parent property, disconnects all connections, and calls Destroy() on all children. |
| Instance:destroy | () | |
| Instance:FindFirstAncestor | Instance? | Returns the first ancestor of the Instance whose Instance.Name is equal to the given name. |
| Instance:FindFirstAncestorOfClass | Instance? | Returns the first ancestor of the Instance whose Object.ClassName is equal to the given className. |
| Instance:FindFirstAncestorWhichIsA | Instance? | Returns the first ancestor of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstChild | Instance? | Returns the first child of the Instance found with the given name. |
| Instance:findFirstChild | Instance | |
| Instance:FindFirstChildOfClass | Instance? | Returns the first child of the Instance whose ClassName is equal to the given class name. |
| Instance:FindFirstChildWhichIsA | Instance? | Returns the first child of the Instance for whom Object:IsA() returns true for the given className. |
| Instance:FindFirstDescendant | Instance? | Returns the first descendant found with the given Instance.Name. |
| Instance:GetActor | Actor? | Returns the Actor associated with the Instance, if any. |
| Instance:GetAttribute | Variant | Returns the value which has been assigned to the given attribute name. |
| Instance:GetAttributeChangedSignal | RBXScriptSignal | Returns an event that fires when the given attribute changes. |
| Instance:GetAttributes | Dictionary | Returns a dictionary of the instance's attributes. |
| Instance:GetChildren | Instances | Returns an array containing all of the instance's children. |
| Instance:getChildren | Instances | |
| Instance:GetDebugId | string | Returns a coded string of the debug ID used internally by Roblox. |
| Instance:GetDescendants | Instances | Returns an array containing all of the descendants of the instance. |
| Instance:GetFullName | string | Returns a string describing the instance's ancestry. |
| Instance:GetStyled | Variant | Returns the styled or explicitly modified value of the specified property, or else the default property value if it hasn't been styled/modified. |
| Instance:GetStyledPropertyChangedSignal | RBXScriptSignal | Returns an event that fires when the given style property changes on the instance. |
| Instance:GetTags | Array | Gets an array of all tags applied to the instance. |
| Instance:HasTag | boolean | Check whether the instance has a given tag. |
| Instance:IsAncestorOf | boolean | Returns true if an Instance is an ancestor of the given descendant. |
| Instance:IsDescendantOf | boolean | Returns true if an Instance is a descendant of the given ancestor. |
| Instance:isDescendantOf | boolean | |
| Instance:IsPropertyModified | boolean | Returns true if the value stored in the specified property is not equal to the code-instantiated default. |
| Instance:QueryDescendants | Instances | Returns an array containing all descendants of the instance that match the selector string. |
| Instance:Remove | () | Sets the object's Parent to nil, and does the same for all its descendants. |
| Instance:remove | () | |
| Instance:RemoveTag | () | Removes a tag from the instance. |
| Instance:ResetPropertyToDefault | () | Resets a property to its default value. |
| Instance:SetAttribute | () | Sets the attribute with the given name to the given value. |
| Instance:WaitForChild | Instance | Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object:GetPropertyChangedSignal | RBXScriptSignal | Get an event that fires when a given property of the object changes. |
| Object:IsA | boolean | Returns true if an object's class matches or inherits from a given class. |
| Object:isA | boolean |
StudioScreenshotCapture:GetBuffer
Returns the captured screenshot as a buffer encoded in the capture's BufferFormat. This method only succeeds when BufferStatus is StudioCaptureBufferStatus.Ready; if the image is not yet available or the capture failed, it raises an error instead of returning a buffer.
Returns
| Type | Description |
|---|---|
| buffer | A buffer containing the captured image data in the capture's BufferFormat. |
| Field | Value |
|---|---|
| security | PluginSecurity |
| thread safety | Unsafe |
StudioScreenshotCapture:GetErrors
Returns an array of the error messages recorded for this capture. The array is empty when no errors have occurred; when BufferStatus is StudioCaptureBufferStatus.Error, it contains one or more messages describing why the capture or scale failed.
Returns
| Type | Description |
|---|---|
| Array | An array of strings describing any errors that occurred during the capture. |
| Field | Value |
|---|---|
| security | PluginSecurity |
| thread safety | Unsafe |
StudioScreenshotCapture:ScaleAsync
Returns a new StudioScreenshotCapture whose image is computed from this capture, resized to newSize using the given ResamplerMode. The original capture is not modified. ResamplerMode.Default resamples with bilinear filtering, while ResamplerMode.Pixelated uses nearest-neighbor (point) sampling; the scaled capture inherits this capture's Position, OriginalSize, BufferFormat, and UICaptureMode.
This method yields until the scaled image has been encoded. It errors if newSize is not positive, or if this capture's BufferStatus is not StudioCaptureBufferStatus.Ready.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| strategy | ResamplerMode | The ResamplerMode used to resample the image. ResamplerMode.Default applies bilinear filtering; ResamplerMode.Pixelated applies nearest-neighbor (point) sampling. | |
| newSize | Vector2 | The width and height, in pixels, of the scaled image. |
Returns
| Type | Description |
|---|---|
| StudioScreenshotCapture | A new StudioScreenshotCapture whose image is this capture scaled to newSize. |
| Field | Value |
|---|---|
| tags | ["Yields"] |
| security | PluginSecurity |
| thread safety | Unsafe |
Events
Inherited from Instance
| Name | Type / Returns | Description |
|---|---|---|
| Instance.AncestryChanged | Fires when the Instance.Parent property of this object or one of its ancestors is changed. | |
| Instance.AttributeChanged | Fires whenever an attribute is changed on the Instance. | |
| Instance.ChildAdded | Fires after an object is parented to this Instance. | |
| Instance.childAdded | ||
| Instance.ChildRemoved | Fires after a child is removed from this Instance. | |
| Instance.DescendantAdded | Fires after a descendant is added to the Instance. | |
| Instance.DescendantRemoving | Fires immediately before a descendant of the Instance is removed. | |
| Instance.Destroying | Fires immediately before (or is deferred until after) the instance is destroyed via Instance:Destroy(). | |
| Instance.StyledPropertiesChanged | Fires whenever any style property is changed on the instance, including when a property is set to nil. |
Inherited from Object
| Name | Type / Returns | Description |
|---|---|---|
| Object.Changed | Fires immediately after a property of the object changes, with some limitations. |