Trying to Read Captures Yields Indefinitely?

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 :uhh:). 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:wut:).

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 :pensive_face:

Where did you find the ReadCapturesFromGalleryAsync() method? I can’t seem to find it in the CaptureService documentation

I got off of GitHub from robloxapi.github.oi!

And are these listed and explained in the auto-completetion? Might be worth looking at the description or finding a documentation link

1 Like

If there is no listing or explanation of the Method in Studio, it’s likely that you don’t have access to it

1 Like

Ah, yeah that’s what I was worried about :broken_heart:
Welp, thanks! Hopefully we can get access to these APIs in the future!

No problem, in case you want to see the official documentation for yourself, here it is:

https://create.roblox.com/docs/reference/engine/classes/CaptureService

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.