Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[GUI] How do I add an imago of a player?

How do i put an image of a player into an image label. I dont want to make lots of decals for the images. i know its possible but how. I cant find anything online

2 answers

Here! Try this link in the code below. But make sure you configure the size for the image itself first!

local playerImageSize = 100 -- This must be a perfect square!
local playerName = game.Players.LocalPlayer.Name -- Hopefully you're using a Local Script!

script.Parent.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x="..playerImageSize.."&y="..playerImageSize.."&username="..playerName

Any questions? Leave them in the comments. Thanks!

ROBLOX has avatar images that you can use, you can easily edit their properties such as size and who is in the image.

Here's some example code I made

player = game.Players.LocalPlayer.UserId
-- You can edit who the player is above.

script.Parent.Image = "https://www.roblox.com/headshot-thumbnail/image?userId="..player.."&width=420&height=420&format=png"

script.Parent.Image = "https://www.roblox.com/asset-thumbnail/image?assetId="..player.."&width=420&height=420&format=png"

script.Parent.Image = "https://www.roblox.com/bust-thumbnail/image?userId="..player.."&width=420&height=420&format=png"

This discussion is preserved as it was. New answers, comments, and votes are closed.