Captures APIs are now available!

Pls make a tutorial for this!

Can someone help me? How do I use this in code? I ways get an error.

Since this might help people, I will provide a code example here

captureService:CaptureScreenshot(function(contentId)
  captureService:PromptShareCapture(contentId)
end)

It’s easy to understand

4 Likes

How do I get this? Theres no game:GetService(“ScreenshotHud”)

I advise you to see what they have to say before you could ask.

local guiService = game:GetService("GuiService")

guiService:WaitForChild("ScreenshotHud")

You can see the documentation about it.

2 Likes

		local succes,data = pcall(function() 
			return PoliceS:GetPolicyInfoForPlayerAsync(player)
		end)
		if succes then
			if data.IsContentSharingAllowed == true then
               print("Allowed")
            else 
               print(data.IsContentSharingAllowed)
            end
           else
             print(data)
            end

This: print(data.IsContentSharingAllowed) prints nil -always.
When I print data:
{
[“AllowedExternalLinkReferences”] = ▼ {
[1] = “Discord”,
[2] = “YouTube”,
[3] = “Twitch”,
[4] = “Facebook”
},
[“AreAdsAllowed”] = true,
[“ArePaidRandomItemsRestricted”] = false,
[“IsPaidItemTradingAllowed”] = true,
[“IsSubjectToChinaPolicies”] = false
Theres no IsContentSharingAllowed

1 Like

I’ve released a new video on this API found here.

2 Likes

i just try some things in roblox studio with this new APIs but in the Roblox Launcher it dosent work, its a bug or its not full released yet?

Would it be possible for us to convert the capture image into Base64? I’d love to transfer the image to different place outside Roblox through HttpService

Could be useful for automatic bug reporting, etc.

/Mub

Are there any plans in the future for developers being able to store captures (like as an EditableImage)?

The ContentIds are Image Ids so it is already possible for your purposes.

2 Likes

next you should allow us to prompt players to join our groups (just like how the favourite API works) :eyes:

Or maybe like the favourites gui a gui that says “Logging off” and logs you off of Roblox itself

I mean uh a GUI that prompts players to upvote or downvote the game

2 Likes


How to see capture location on PC Studio

I think the ability to decide the aspect ratio would be nice so I could make the capture be either a retro 4:3 or a cinematic 21:9 or any other arbitrary aspect ratio for stylistic reasons.

You can select the photo in the Captures menu and click on the save button to get the image

1 Like

@TheGamer101 Since I didn’t see this mentioned anywhere in the thread, calling StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) will not disable the captures CoreGui at present. Is this intended? I’m erring on the side of it being an oversight.

This is not intended, does it work for you when you use Enum.CoreGuiType.Captures?

I think this is caused because we are listening to CoreGuiChangedSignal for only the Captures type in the Captures frontend code, but when you call SetCoreGuiEnabled this signal is only sent for the All type and not each CoreGuiType EnumItem individually.

We will fix this in a future release, sorry for the inconvenience.

2 Likes

Yeah, the Captures CoreGuiType works fine.

While on the subject however (though slightly out of scope of this thread), is there any chance we’ll be able to disable the SelfView CoreGuiType at any point in the future? Right now trying to disable it just spits out a warning in the output.

I made some effects

4 Likes

Not sure if I’m misunderstanding something here, but I tried this on a mobile device and used PromptSaveCapturesToGallery. Everything seems to be working correctly except the actual save part…

I take a capture, it prompts the user to save, I save and that seemingly succeeds. I get a short popup suggesting I share. If I tap the popup I can seemingly share, with reference to the photo, but I can’t find the file anywhere on my device afterwards?


Edit: Nvm, I found it in the captures section of the roblox menu.

I guess overall I’m a bit confused by this I would expect PromptSaveCapturesToGallery to save to the mobile devices gallery (i.e. photos), not to this limbo state where it’s only accessible in the in-game menu and has to be further downloaded from there.

3 Likes