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

How to get a players avatar picture?

function joined(player)
	script.Parent.Image = http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=player.Name"):format("DigitalVeer
end

game.Players.ChildAdded:connect(joined)

the only problem with this is that the first slash after http: says i have a syntax error. THis is the only knowledge i could find of this topic..So please help.

1 answer

Hello there friend. So what's going on here is that the Image property you are looking to edit requires a string representation of where to find the asset.

Here is how I would write that string.

script.Parent.Image = ("http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=%s"):format("DigitalVeer")

(you can read about string.format here)

You mentioned that you had a hard time finding more information about this subject.

1 comment

0

This also did not work.

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