Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there anyway to use Players:GetUserThumbnailAsync() on SurfaceGUI?

Hello, I'm a scripting problem with Player:GetUserThumbnailAsync() because I was trying to use it on a SurfaceGUI, but however it doesn't seem to work on it, only on ScreenGuis is there any way to fix this?

local Players = game:GetService("Players")
 
local player = Players.LocalPlayer
 
local userId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
 
local imageLabel = script.Parent
imageLabel.Image = content
imageLabel.Size = UDim2.new(0, 420, 0, 420)

1 answer

✓ Accepted answer

Local scripts won't work in workspace. You could do local imagelabel = workspace.Part.imagelabel from starter player scripts or some other location.

This discussion is preserved as it was. New answers, comments, and votes are closed.