game.Players.PlayerAdded:connect(function(player)
local image = script.Parent.SurfaceGui.Frame.ImageLabel
image.Image = http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=player
end)
Why is this not working correctly? (Player Picture).
2 answers
###This is because of line 3. You assigned the Image, but didn’t wrap the link in quotes. To fix this:
##Line 3:
image.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..player.Name
3 comments
Nope.
I thought it worked, but it didn't, I noticed I didn't get player name, BUT When I changed it to get playername it still doesn't work.
Didn't work.
Instead of doing
image.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..player.Name
Do this (Executed from a local script)
local getplayer = game.Players.LocalPlayer
script.Parent.Image = game.Players:GetUserThumbnailAsync(getplayer.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100)
-- // Format: (UserID, ThumbnailType, ThumbnailSize)
-- // script.Parent.Image will be your image.
You can fool around with the settings if you want to.
Make sure to assign or create an imagelabel first.
6 comments
Can you explain how line 3 works, I'm really confused.
Didn't work either.
Maybe the player could be undefined. If you use a wait(0.1) at the top of the script it could work.
Still not working, and I'm getting 0 outputs.
That's wierd..
It's inside an image label....
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
You didn’t wrap line 3’s Image in quotes.
Edited!