The image texture doesn't load after the screenshot

I’m trying to use CaptureService with that code:

local CaptureService = game:GetService("CaptureService")

CaptureService:CaptureScreenshot(function(screenshot)
	if screenshot then
		local imageLabel = workspace.Part.SurfaceGui.ImageLabel
		imageLabel.Image = screenshot
	end
end)

But screenshot temporary image doesn’t loading on part
image


Screenshot temporary ID added to ImageLabel.Image, but doesn’t loading

Expected behavior

A screenshot of my screen should have been displayed on part, or rather in ImageLabel

1 Like