Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
5

How would I get a player's picture for a GUI?

Asked by 5 years ago

Hi, I'm making a custom health GUI and I would like to put a player's profile picture next to it, thing is, I don't know how to get a player's picture.

Thanks

1 answer

Log in to vote
4
Answered by 5 years ago

To get the profile picture of a user in a local script you would just do:

local player = game.Players.LocalPlayer

game.Players.PlayerAdded:connect(function()
script.Parent.Image= "http://www.roblox.com/Thumbs/Avatar.ashx?                         x=100&y=100&Format=Png&username="..player.Name

end)

Put the local script inside the the image on studio.

Ad

Answer this question