Log in to vote

How do I make it so that the players thumbnail pops off the screen when a button is clicked?

Asked by 2 years ago
-- 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)
    local imgLabel = game.StarterGui.ScreenGui.Frame.ImageLabel
    imgLabel.Image = content
-- Call the function above when the button is clicked.

I put this script inside the button. No errors, yet didn't work.

Is the ImageLabel visible? If not, you need to set it after the line 'imgLabel.Image = content'. Padugz 40 — 2y
use PlayerGui not StarterGui Amiaa16 3227 — 2y

Answer this question