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

I need some help displaying the player's pic?

Asked by 10 years ago

I am using a script from Stickmasterluke and I changed it a bit. Now I cant display the pic of the player and I need to use the pic for a game that I am making. can someone fix my script?

game.Players.PlayerAdded:connect(function(player) -- You have the player! 
plr = player.Name
print(plr)
end)
function check()
    if plr and plr.Parent~=nil then
        sp.Image="http://www.roblox.com/Thumbs/Avatar.ashx?x=120&y=225&Format=Png&username="..plr
    end
end

check()
plr.Changed:connect(check)

2 answers

Log in to vote
1
Answered by
Merely 2122 Moderation Voter Community Moderator
10 years ago

That thumbnail URL only allows certain image widths and heights. 120 by 225 is not valid.

sp.Image="http://www.roblox.com/Thumbs/Avatar.ashx?x=110&y=110&Format=Png&username="..plr
0
The more you know (; soaprocks2 75 — 10y
Ad
Log in to vote
-1
Answered by
dyler3 1510 Moderation Voter
10 years ago

Try This:

game.Players.PlayerAdded:connect(function(player) -- You have the player! 
print(player.Name)
end)
function check()
    if player and plr.Parent~=nil then
        sp.Image="http://www.roblox.com/Thumbs/Avatar.ashx?x=120&y=225&Format=Png&username="..player.Name
    end
end

check()
player.Changed:connect(check)

Answer this question