Service · inherits Instance
StudioCaptureService
A Studio-only service that lets plugins capture screenshots of the active place's 3D viewport.
About StudioCaptureService
StudioCaptureService is a Studio-only service that lets plugins capture
screenshots of the active place's 3D viewport. Use
RequestScreenshotPermissionAsync()
to obtain the user's permission,
CanCaptureScreenshot() to
check whether a capture is currently possible, and
CaptureScreenshot() to
request an image of the current view. All members require plugin security and
are only available within Studio.
Methods 3
CanCaptureScreenshot
() → booleanPluginReturns whether a screenshot can currently be captured.Returns
falsewhen there is a known reason a screenshot cannot be captured — for example, when this is not the activeDataModelor the plugin does not have permission — andtrueotherwise. A return value oftruedoes not guarantee thatCaptureScreenshot()will succeed, because conditions can change between the two calls.CaptureScreenshot
(screenshotOptions: Dictionary) → StudioScreenshotCapturePluginCaptures a screenshot of the active place according to the provided options.Captures a screenshot of the active
DataModelaccording toscreenshotOptionsand returns aStudioScreenshotCapturein the requested format. If an image of the requested size cannot be captured at the requested position, the capture fails rather than clipping the image.The
screenshotOptionsdictionary accepts the following keys:Position— aVector2top-left offset of the captured region. Must be non-negative and defaults to(0, 0).CaptureSize— aVector2size of the region to capture. Both components must be positive.OutputSize— aVector2size of the returned image. Both components must be positive; when it differs fromCaptureSize,ResampleModemust also be provided.ResampleMode— the resampling filter used whenOutputSizediffers fromCaptureSize.Format— anStudioCaptureScreenshotFormatfor the returned buffer. Defaults toStudioCaptureScreenshotFormat.RGBA8.UICaptureMode— anUICaptureModecontrolling whether UI is included in the capture. Defaults toUICaptureMode.All.
The returned
StudioScreenshotCaptureis populated asynchronously: its image buffer becomes available only after the capture and encoding complete, and any errors are reported on the capture object.RequestScreenshotPermissionAsync
() → booleanYieldsPluginRequests the user's permission for the plugin to capture screenshots from the Studio 3D view.This yielding function asks the user to grant the plugin permission to capture screenshots from their Studio 3D view, returning
trueif permission is granted andfalseotherwise. It can return immediately without prompting when the plugin's permission is already known from an earlier session, and it returnsfalsewithout prompting when the global screenshot setting is disabled.
StudioCaptureService also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.