I'm making a script that puts the user's player thumbnail on a decal but it doesn't seem to be working. The script is a LocalScript located in the decal. Here is my code:

local Players = game:GetService("Players")
 
local player = Players.LocalPlayer
 
-- Fetch the thumbnail
local userId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
 
-- Set the Decal's content to the user thumbnail
local Decal = script.Parent
Decal.Texture = content

2 comments

1

is it a local script? where is the script/local script?

0

You can't use a Decal, keep the code, change the Decal to an ImageLabel and try again