Hello im trying to make a system where it puts a Players headshot on the wall and every time there avatar changes it will update but for some reason its not putting the image on the decal and it just stays blank. can someone please help me fix this
this system runs off serverside script so i dont know if anything is wrong with that…
local Players = game:GetService("Players")
local userId = script.Parent.UserId.Value
while true do
local thumbnail, isReady = Players:GetUserThumbnailAsync(userId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
if isReady and thumbnail ~= "" then
print("Thumbnail URL: ", thumbnail)
if script.Parent:FindFirstChild("PhotoFrame") and script.Parent.PhotoFrame:FindFirstChild("Photo") and script.Parent.PhotoFrame.Photo:FindFirstChild("Decal") then
script.Parent.PhotoFrame.Photo.Decal.Texture = thumbnail
print("Decal updated with thumbnail.")
else
warn("Decal path is incorrect!")
end
else
warn("Thumbnail not ready or failed to load!")
end
wait(5)
end