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

How to fetch a player's picture?

Asked by 9 years ago

Is it like this?

imagebutton = script.Parent

imagebutton.Image = "idontknowwhattoputinthis"

2 answers

Log in to vote
4
Answered by 9 years ago

It is up to you to modify the parameters yourself but this URL will get you a players avatar based off their username which you put at the end:

iB.Image = ("http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=%s"):format("DigitalVeer")
Ad
Log in to vote
0
Answered by 9 years ago

ROBLOX already has a pre-made system to get a players avatar picture. Were gonna first add in an extra variable called player to get the Player's name

imagebutton = script.Parent
player = game.Players.LocalPlayer.Name -- Not sure if your using a local script or not

imagebutton.Image = http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=player

Then we add the players name to the end of the avatar code.

For additional use here it is: http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=

If this helped please accept this answer.

Answer this question