Heya friends! I was looking at Roblox’s brand new ‘feature’, Moments. I think I remember Roblox saying Moments where built on APIs that we developers have access to. So, I got curious, and I wanted to Read a user’s captures to display in-game.
As I said in my title, when I call ReadCapturesFromGalleryAsync yields indefinitely (Or takes WAY too long
). I do request to Read the user’s captures with PromptCaptureGalleryPermissionAsync. Also, I did add OnCapturePermissionsPromptFinished just to see if that’s my issue but, it wasn’t.
When I try to call RetrieveCaptures, I get The current thread cannot call 'RetrieveCaptures' (lacking capability RobloxScript) (Same error when I call ‘OnCapturePermissionsPromptFinished’
).
Here’s the short testing code I have:
-- LocalScript located in StarterPlayerScripts!
local CaptureService = game:GetService("CaptureService")
task.wait(2)
CaptureService:PromptCaptureGalleryPermissionAsync(Enum.CaptureGalleryPermission.ReadAndUpload)
task.wait(5) -- Just for testing so I can click 'Allow' on the prompt!
local userCaptures = CaptureService:ReadCapturesFromGalleryAsync() -- Code yields here
-- (┬┬﹏┬┬)
print(userCaptures)
I fear the worst that trying to Read the player’s/user’s captures is only for Roblox ![]()