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

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

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

4 comments

6

That was a poor attempt you should be ashamed of yourself.

3

Did you even try?

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.

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.

2 answers

✓ Accepted answer

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.

2 comments

0

the end was there, it just didnt copy and paste. thanks for the answer..

0

No problem.

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

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