I'm making a game and it involves the players image on a part, I've tried to put a surface gui on to a part and then put a image label with a local script inside it

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)

but this doesn't seem to be working.

1 comment

0

The problem is, that local scripts will only run inside startergui, starterpack, startercharacter and starterplayer.