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

The Users profile Picture doesnt seem to show up, is this the right way to try to find it?

Asked by 8 years ago

I have left out other pieces of code that might be more important, my question is would attempting to get the picture of the user in this way work? (looking down at the 5th line of code)

local Character = Object.Parent:FindFirstChild("Humanoid")

        if Character ~= nil then
            local Player = game.Players:GetPlayerFromCharacter(Object.Parent)

            if Player ~= nil then
                Picture.Image = "http" ..  Player.Name
                User.Text = Player.Name
6
That was a poor attempt you should be ashamed of yourself. User#6546 35 — 8y
3
Did you even try? TheHospitalDev 1134 — 8y
1
Did you even attempt to make this? I have a feeling you found this from a OLD FM. But, it is still a poor, disgraceful attempt. MessorAdmin 598 — 8y
0
relaxe guys I did make it myself, this is only a portion of the script and I didnt think it worked the same as gear. ProgramsMan 100 — 8y

2 answers

Log in to vote
3
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

No. All you have to do is change "http" to "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username=".

Also, you forgot to add 'end' to your if statements.

local Character = Object.Parent:FindFirstChild("Humanoid")
if Character ~= nil then
    local Player = game.Players:GetPlayerFromCharacter(Object.Parent)
    if Player ~= nil then
        Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username=" ..  Player.Name
        User.Text = Player.Name
    end
end

I'm assuming the rest of this script works. Hope this helps.

0
the end was there, it just didnt copy and paste. thanks for the answer.. ProgramsMan 100 — 8y
0
No problem. Pyrondon 2089 — 8y
Ad
Log in to vote
0
Answered by
itsJooJoo 195
8 years ago

That is all wrong, the link to the users profile goes like this

"http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..Player.Name

So the finished one should look like:

local Character = Object.Parent:FindFirstChild("Humanoid")

        if Character ~= nil then
            local Player = game.Players:GetPlayerFromCharacter(Object.Parent)

            if Player ~= nil then
                Picture.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=" ..Player.Name
                User.Text = Player.Name

Answer this question