Hi, I made this script and everything works fine, the GUI pops up and even in output where I say "print image" it prints out a URL that leads to a picture that I want to use (In this case a user avatar) however in-game I don't get any errors but the image label won't change, here's the script and thanks in advance
wait(10)
local DIDend = game.Workspace.Dangerous_Dirt.EndPart
local Players = game:GetService("Players")
local debounce = false
DIDend.Touched:Connect(function(hit)
if not debounce then
debounce = true
local player = Players:GetPlayerFromCharacter(hit.Parent)
local userId = player.UserId
print (userId)
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size352x352
local imageLabel = game.StarterGui.PlayerWin.Frame.PlayerAV
imageLabel.Image = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
print(imageLabel.Image)
imageLabel.Size = UDim2.new(0, 352, 0, 352)
game.ReplicatedStorage.ShowGui:FireAllClients(game.Players:GetPlayerFromCharacter(hit.Parent))
debounce = false
DIDend:Destroy()
end
end)

1 comment
Thank you so much!