Im Doing a piggy game with tommy cat's past stream. but when i tried to do the thumbnail for the avatar, this error showed up "thumbnailSize is not a valid EnumItem" and the image didnt show up.
local topFrame = script.Parent:WaitForChild("TopFrame") local bottomFrame = script.Parent:WaitForChild("BottomFrame") local rStorage = game:GetService("ReplicatedStorage") local rEvents = rStorage:WaitForChild("RemoteEvents")
rEvents.AddWaitingPlayer.OnClientEvent:Connect(function(joiner) local frame = game:GetService("ReplicatedFirst"):WaitForChild("WaitingPlayerFrame"):Clone() frame.Name = joiner.UserId frame.Parent = topFrame.PlayersFrame frame.NameText.Text = joiner.Name frame.PlayerCharacterImage.Image = game.Players:GetUserThumbnailAsync(joiner.UserId,Enum.ThumbnailType.HeadShot,Enum.thumbnailSize.size420x420) end)
rEvents.RemoveWaitingPlayer.OnClientEvent:Connect(function(leaver) local frame = topFrame.PlayersFrame:FindFirstChild(leaver.UserId) if frame then frame:Destroy() end end)
It's supposed to be ThumbnailSize
Here's a script for this
local player = game.Players.LocalPlayer local userId = player.UserId local thumbType = Enum.ThumbnailType.HeadShot local thumbSize = Enum.ThumbnailSize.Size420x420 game.Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)