I have a brick that I would like to have a surfaceGUI on it to show a player's avatar, but I am new to GUI's and am not sure how to do that..
Help?
I have a brick that I would like to have a surfaceGUI on it to show a player's avatar, but I am new to GUI's and am not sure how to do that..
Help?
The Gui would be an ImageLabel and its Image property would be set by this:
"http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=150&Format=Png&username=" .. Player.Name
(the picture of the Player)
script.Parent.ImageLabel.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=420&y=420&username="..Game.Players.LocalPlayer.Name
This script would make "script.Parent" show the avatar of the LocalPlayer.
Would the script's parent be the part, the SurfaceGUI, or the ImageLabel? Also.. I have the SurfaceGUI in the part, and the ImageLabel in the SurfaceGUI. Is my setup correct?
Simply change "script.Parent.ImageLabel" to any path leading to the GUI.
delete ImageLabel in the beginning
I'm not sure.
You can use userID.
Don't answer if you don't know the answer.
umg, Fine. Bossy.
that works too
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
https://scriptinghelpers.org/questions/47609/how-to-get-the-players-avatar-image-into-gui