Learn
Engine Class
CaptureService
Not Creatable
Service

Summary
Methods
CaptureScreenshot(onCaptureReady: function):()
PromptSaveCapturesToGallery(captures: {any},resultCallback: function):()
PromptShareCapture(captureContent: Content,launchData: string,onAcceptedCallback: function,onDeniedCallback: function):()
ReadCapturesFromGalleryAsync(captureTypeFilters: {any},readFromAllEligibleExperiences: boolean):Tuple
TakeScreenshotCaptureAsync(onCaptureReady: function,captureParams: Dictionary):()
Inherited Members

API Reference
Methods
CaptureScreenshot
Capabilities: Capture
CaptureService:CaptureScreenshot(onCaptureReady:function):()
Parameters
onCaptureReady:function
Returns
()
Code Samples
Capture Screenshot
local CaptureService = game:GetService("CaptureService")
-- Reference to an ImageLabel parent of the script containing this code
local imageLabel = script.Parent
local function onCaptureReady(contentId)
imageLabel.Image = contentId
end
CaptureService:CaptureScreenshot(onCaptureReady)

CheckUploadCaptureStatusAsync
Yields
Capabilities: Capture
CaptureService:CheckUploadCaptureStatusAsync(token:string):Tuple
Parameters
token:string
Returns

PromptCaptureGalleryPermissionAsync
Yields
Capabilities: Capture
CaptureService:PromptCaptureGalleryPermissionAsync(captureGalleryPermission:Enum.CaptureGalleryPermission):boolean
Parameters
captureGalleryPermission:Enum.CaptureGalleryPermission
Returns
Code Samples
Prompt capture gallery permission
local CaptureService = game:GetService("CaptureService")
local function isGalleryAccessGranted()
local accepted = CaptureService:PromptCaptureGalleryPermissionAsync(Enum.CaptureGalleryPermission.ReadAndUpload)
return accepted
end

PromptSaveCapturesToGallery
Capabilities: Capture
CaptureService:PromptSaveCapturesToGallery(
captures:{any}, resultCallback:function
):()
Parameters
captures:{any}
resultCallback:function
Returns
()

PromptShareCapture
Capabilities: Capture
CaptureService:PromptShareCapture(
captureContent:Content, launchData:string, onAcceptedCallback:function, onDeniedCallback:function
):()
Parameters
captureContent:Content
launchData:string
onAcceptedCallback:function
onDeniedCallback:function
Returns
()
Code Samples
Prompt Share Capture
local CaptureService = game:GetService("CaptureService")
local function onShareAccepted()
print("Capture share was accepted!")
end
local function onShareDenied()
print("Capture share was denied!")
end
local onCaptureReady = function(result, videoCapture)
if videoCapture then
local captureContent = Content.fromObject(videoCapture)
CaptureService:PromptShareCapture(captureContent, "launchData" , onShareAccepted, onShareDenied)
end
end
CaptureService:StartVideoCaptureAsync(onCaptureReady, {})

ReadCapturesFromGalleryAsync
Yields
Capabilities: Capture
CaptureService:ReadCapturesFromGalleryAsync(
captureTypeFilters:{any}, readFromAllEligibleExperiences:boolean
Parameters
captureTypeFilters:{any}
Default Value: "{}"
readFromAllEligibleExperiences:boolean
Default Value: false
Returns
Code Samples
Read captures from gallery and iterate over pages
local CaptureService = game:GetService("CaptureService")
local function readCapturesFromGallery()
local allCaptures = {}
local capturesPages
local success, result = pcall(function()
local readResult, pages = CaptureService:ReadCapturesFromGalleryAsync({}, false)
if readResult == Enum.ReadCapturesFromGalleryResult.Success then
capturesPages = pages
end
return readResult
end)
if not success or result ~= Enum.ReadCapturesFromGalleryResult.Success then
-- Likely a permissions error, see CaptureService:PromptCaptureGalleryPermissionAsync()
warn("Failed to fetch initial captures: " .. result.Name)
return
end
-- Iterate through current page
local currentPage = capturesPages:GetCurrentPage()
for _, capture in currentPage do
table.insert(allCaptures, capture)
end
-- Advance to next page until finished
while not capturesPages.IsFinished do
local advanceToNextPageSuccess, _ = pcall(function()
capturesPages:AdvanceToNextPageAsync()
end)
if not advanceToNextPageSuccess then
return
end
currentPage = capturesPages:GetCurrentPage()
for _, capture in currentPage do
table.insert(allCaptures, capture)
end
end
return allCaptures
end

StartUploadCaptureAsync
Yields
Capabilities: Capture
CaptureService:StartUploadCaptureAsync(capture:Capture):Tuple
Parameters
capture:Capture
Returns

StartVideoCaptureAsync
Yields
Capabilities: Capture
CaptureService:StartVideoCaptureAsync(
onCaptureReady:function, captureParams:Dictionary
Parameters
onCaptureReady:function
captureParams:Dictionary
Default Value: "nil"
Code Samples
Start Video Capture Async
local CaptureService = game:GetService("CaptureService")
local tool = Instance.new("Tool")
tool.Parent = workspace
local onCaptureReady = function(result, videoCapture)
if result ~= Enum.VideoCaptureResult.Success and result ~= Enum.VideoCaptureResult.TimeLimitReached or not videoCapture then
print("Video recording failed to complete for reason:", result)
else
-- Prompt the user to save the video capture to their gallery
CaptureService:PromptSaveCapturesToGallery({ videoCapture }, function()
print("Capture saved")
end)
end
end
tool.Activated:Connect(function()
local videoRecordingAllowedResult: Enum.VideoCaptureStartedResult = CaptureService:StartVideoCaptureAsync(onCaptureReady, {})
if videoRecordingAllowedResult ~= Enum.VideoCaptureStartedResult.Success then
print("Video recording failed to start for reason:", videoRecordingAllowedResult)
end
end)

StopVideoCapture
Capabilities: Capture
CaptureService:StopVideoCapture():()
Returns
()

TakeScreenshotCaptureAsync
Capabilities: Capture
CaptureService:TakeScreenshotCaptureAsync(
onCaptureReady:function, captureParams:Dictionary
):()
Parameters
onCaptureReady:function
captureParams:Dictionary
Default Value: "nil"
Returns
()
Code Samples
Take Screenshot Capture Async
local CaptureService = game:GetService("CaptureService")
local parent = Instance.new("Tool")
parent.Parent = workspace
local onCaptureReady = function(result, screenshotCapture)
if result ~= Enum.ScreenshotCaptureResult.Success or not screenshotCapture then
print("Screenshot failed to complete for reason:", result)
else
-- Prompt the user to save the screenshot capture to their gallery
CaptureService:PromptSaveCapturesToGallery({ screenshotCapture }, function(results)
for capture, result in pairs(results) do
if result then
print("Capture saved")
end
end
end)
end
end
parent.Activated:Connect(function()
CaptureService:TakeScreenshotCaptureAsync(onCaptureReady, { UICaptureMode = Enum.UICaptureMode.All })
end)

UploadCaptureAsync
Yields
Capabilities: Capture
CaptureService:UploadCaptureAsync(capture:Capture):Tuple
Parameters
capture:Capture
Returns
Code Samples
Upload capture to asset system
local CaptureService = game:GetService("CaptureService")
local function uploadCapture(capture: Capture)
local success, result = pcall(function()
local uploadCaptureResult, assetId = CaptureService:UploadCaptureAsync(capture)
if uploadCaptureResult ~= Enum.UploadCaptureResult.Success then
-- Handle failure
return nil
end
return assetId
end)
if not success then
-- Handle error
return nil
end
return result
end

Events
CaptureBegan
Capabilities: Capture
CaptureService.CaptureBegan(captureType:Enum.CaptureType):RBXScriptSignal
Parameters
captureType:Enum.CaptureType

CaptureEnded
Capabilities: Capture
CaptureService.CaptureEnded(captureType:Enum.CaptureType):RBXScriptSignal
Parameters
captureType:Enum.CaptureType

CaptureSaved
Deprecated

UserCaptureSaved
Capabilities: Capture
CaptureService.UserCaptureSaved(captureContentId:ContentId):RBXScriptSignal
Parameters
captureContentId:ContentId

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.