Learn
Engine Class
CapturesPages
Not Creatable
Not Replicated

Summary
Inherited Members
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
©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.