Hi I am using the captures api so it displays a photo on an imagelabel. I don’t know much about this but is there a way to save it to like a datastore or something so it can always be there? I need this because I am making a game where people can make their worlds and I need it so they can take a photo of their world so it shows on the world page
script.Parent.MouseButton1Down:Connect(function()
local CaptureService = game:GetService("CaptureService")
local imageLabel = script.Parent.Parent.ImageLabel
local function onCaptureReady(contentId)
imageLabel.Image = contentId
end
CaptureService:CaptureScreenshot(onCaptureReady)
end)
yes, but what OP could do is save the content id, check for the id, and then load that specific id, but saved on a server script.
local player = game.Players.LocalPlayer -- cache and get the player
-- get the saved image id (save it on the server)
local savedImageId = player:WaitForChild(savedImageId, 10)
local function idk()
-- check if there was a save
if savedImageId then
--load it
end
end)
script.Parent.MouseButton1Down:Connect(function()
local CaptureService = game:GetService("CaptureService")
local imageLabel = script.Parent.Parent.ImageLabel
local function onCaptureReady(contentId)
imageLabel.Image = contentId
end
CaptureService:CaptureScreenshot(onCaptureReady)
end)