Captures APIs are now available!

Hello Creators,

Today we’re launching new APIs for captures, allowing you to control how the captures feature integrates with your experiences.

Last year, we released captures, which allow people to take a screenshot, save, and share a snapshot of what is displayed on their device screen within an experience. We are exploring expanding to enable video and other formats in the future. For more details on captures, see Help FAQ here.

As we shared in a recent blog post, when people connect with friends on Roblox, they return more often to explore experiences together, which drives engagement. Captures make it easier for users to share screenshots and invite their friends to join their experience which improves discoverability, and fosters a vibrant community.

To date, this feature has seen widespread adoption in terms of volume and frequency of use, as users have collectively taken over half a billion screenshots and shared 200K screenshots every day.

Captures APIs

The Captures APIs will allow you to include pre-set moments within your experience where a screenshot is automatically taken for users. Users will have the option to save, share, or delete the screenshot.

Since you know your experiences best, you can identify the most interesting moments and achievements to capture. Prompting users to take captures will encourage more content sharing and in turn, allow new users to find and try your experience.

Imagine taking a screenshot and saving a close finish for a car race or an awesome hole-in-one in a golf experience! There are endless ways for you to make the most of those memorable moments in your experience.

CaptureService APIs

[Method] CaptureService:CaptureScreenshot(onCaptureReady(contentId))

This new API allows you to automatically capture a screenshot for a user in your experience.

The screenshot is not immediately saved to the user’s Captures — instead, a temporary ContentId will be created for the new capture. You can use the onCaptureReady callback to prompt the user to save or share the screenshot. The user can then choose whether they would like to save the capture or not.


[Method] CaptureService:PromptShareCapture(contentId, launchData, onAcceptedCallback, onDeniedCallback)
This API allows you to prompt a user to share a capture using the native share sheet on their device. The capture image will be shared along with an invite to the experience (where supported). Note: Not all devices and/or apps support including both a screenshot and an invite link, so results may vary.

The launchData string will be available in the JoinData for users who join through the invite link. See developer deeplinking.

An error will be thrown if the user is not able to share content (i.e it’s not supported or their privacy settings do not allow this). The developer can check the new PolicyService IsContentSharingAllowed field to avoid this error.

Example usage:
local CaptureService = game:GetService("CaptureService")

local captureLaunchData = {
  isScreenshotInvite = true,
  inviterUserId = 2231221,
}

local launchData = HttpService:JSONEncode(captureLaunchData)

CaptureService:PromptShareCapture(captureContentId, launchData)

[Method] CaptureService:PromptSaveCapturesToGallery({contentIds}, resultCallback({[contentId]: boolean})

This API can be used to prompt a user to save captures to their Captures Gallery.

Example usage:
local CaptureService = game:GetService("CaptureService")

local userRejectedSaveCaptures = false

local function resultCallback(results)
 local allRejected = true
 for contentId, accepted in results do
   if accepted then
     allRejected = false
   end
 end


 if allRejected then
   -- user might not want developer captures, don't prompt again
   userRejectedSaveCaptures = true
 end
end


local function onRoundEnded(gameplayCaptures)
 if #gameplayCaptures == 0 or userRejectedSaveCaptures then
   return
 end

 CaptureService:PromptSaveCapturesToGallery(gameplayCaptures, resultCallback)
end

[Event] CaptureService.UserCaptureSaved(contentId)
This event can be used to determine when a user has taken a capture in your experience and can be used for analytics or for prompting users to share their captures.


[Event] CaptureService.CaptureBegan()

The CaptureBegan event is fired immediately before a capture begins and can be used to customize the Captures experience in your experience (for example customizing what GUI elements are hidden).


[Event] CaptureService.CaptureEnded()

The CaptureEnded event is fired after a capture finishes and can be used to restore any changes made by your code when the CaptureBegan fired.

Additional APIs

ScreenshotHud

There is an existing ScreenshotHud singleton that is automatically created and parented to GuiService. The Captures feature will read from the existing OverlayFont, UsernameOverlayEnabled and ExperienceNameOverlayEnabled properties to allow you to customize the watermark in your experience.

Two new properties are being added to ScreenshotHud to allow additional control of the Captures feature:

  • bool HideCoreGuiForCaptures (default true)

    • When true, the CoreGui will be hidden when new screenshot captures are taken.
  • bool HidePlayerGuiForCaptures (default true)

    • When true, the PlayerGui will be hidden when new screenshot captures are taken.

CoreGuiType Enum

CoreGuiType.Captures = 7

There is a new Captures EnumItem for the CoreGuiType Enum, which you can use to disable the captures feature with the StarterGui:SetCoreGuiEnabled() API.

Usage:
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Captures, false)

What’s Next

Currently, users can only take captures on desktop and mobile devices. We are looking into expanding to more platforms and adding video support and other formats in the future. We are excited to see what awesome moments your users will capture and share! Please share any feedback in the comments below.

Resources

225 Likes

This topic was automatically opened after 10 minutes.

This is HUGE, I have been needing something like this for ages to allow users to take ride photos after experiencing a roller coaster at MovieWorld!

THANK YOU for adding it! :heart:

Also, this link opens a Google Doc?

All the recent studio updates have been great! Are there plans to allow this feature to turn the images taken into base64?

33 Likes

Will there be something like a Feed page on Roblox where screenshots can be shared on the platform? and the ability to display these in game as well?

it would let us make games with this feature a lot more interesting

wait what happened to PC support?

28 Likes

Oof, that was unintentional. I’ve removed it now.

18 Likes

sick!! I love it :happy4::happy4::happy4::happy4::happy4::happy4::happy4::happy4::happy4::happy4: I will love to use it :slight_smile:

16 Likes

We don’t have a timeline that we can share right now, but enabling users to share content with their friends on the platform is definitely something that’s on our radar!

18 Likes

Where can a user find their “Captures Gallery”?

13 Likes

this is answered in FAQ

8 Likes

Live images. What a way to go to sleep!

10 Likes
  • Go to the Roblox menu on the upper left of your screen
  • Select Captures from the top menu
  • From the Captures menu, tap on any captured screenshots to view them in a carousel
12 Likes

Hope to see this expanded to more platforms and video in general. With that in mind, I hope the quality of recording is better than what Roblox currently has for the in-game Roblox settings menu.

I ran into the lack of recording functionality, and I guess platform support too, when I remade the Roblox escape menu. I ran into some other issues, but that experiment of mine led many to comment about forcing players into interactions. (Such as what we can now do with screenshots)

-Edit Escape Menu - #12 by Reditect

14 Likes

We are planning to expand the Captures feature to desktop soon.

16 Likes

:camera_flash: :star_struck: this response cannot adequately capture my enthusiasm for this feature! :camera: :heart_eyes:

27 Likes

This is the location where the capture can be found: * Go to the Roblox menu on the upper left of your screen

  • Select Captures from the top menu
  • From the Captures menu, tap on any captured screenshots to view them in a carousel
7 Likes

Now all you need to do is allow us to retrieve those images after the fact via script in a form of an image ID. Imagine snapchat in-game and now getting left on open IRL and on Roblox

10 Likes

This is something I would love to do!

5 Likes

So from my understanding, saved images are inside of Gallery within the Roblox app, which would be a bit problematic for PC users, what if I just want it saved to my device instead? for example I want to view some kind of map or information that’d be useful for me later but I can’t view it because it’s within the Roblox app and I can’t open the Gallery while playing a game right?

Can you tell me more about the feature and what can be done for this kind of use case?


Also a video capturing feature would be extremely useful for reporting bugs/glitches and also exploiters for each specific game

4 Likes

Enabling video Captures too is definitely something we are looking forward to, this is actually something our team begun prototyping as part of Hack Week last year :slight_smile:. We don’t have a concrete timeline but it’s something we are working towards!

15 Likes

Are the any plans to add an API to allow capturing a screenshot from a given Camera Instance, not just the currently active camera?

16 Likes