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

How do I use an ImageLabel to display a Character's Avatar?

I'm scripting a Stats Gui for an RPG I'm making, and I want to know what code to use to set an ImageLabel to display the user's Character via a LocalScript. Any help with this?

1 answer

✓ Accepted answer

I think this should work. I used it in my game, I'm not sure if this is how you would change it with localscripts ( I haven't dealt with localscripts much)

--Assuming the script is inside the ImageLabel
script.Parent.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..game.Players.LocalPlayer.Name
--Thanks to the comments for finding my small mistake

1 comment

0

It would be "game.Players.LocalPlayer" rather than just "LocalPlayer"

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