-- The variables for the button. local players = game:GetService("Players") local plr = players.LocalPlayer -- The function for when the button is clicked. local function onClick() local id = plr.UserId local thumbType = Enum.ThumbnailType.AvatarThumbnail local thumbSize = Enum.ThumbnailSize.Size420x420 local content, isReady = players:GetUserThumbnailAsync(id, thumbType, thumbSize) --sep-- local imgLabel = game.StarterGui.ScreenGui.Frame.ImageLabel imgLabel.Image = content end -- Call the function above when the button is clicked. script.Parent.MouseButton1Click:Connect(onClick)
I put this script inside the button. No errors, yet didn't work.