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

How do I get a image of a players avatar?

I'm not sure how to go about this. I want to get a players avatar into an image and attach it to an ImageLabel GUI. Any help is appreciated. Links to API classes that can help are welcomed.

2 comments

0

oh. Just find the person you want the image of, save it. Upload it to Roblox, and then set the ImageLabel GUI to that pic. Now, if you want it to be anyone's profile pic, i think you're stumbling to god-level scripting

0

Refer to the answers below for your "God level" Scripting lol

3 answers

You can get the image of an avatar by setting the id of the image to:

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

1 comment

0

Thank you!

i think this can help, create a script and put in the imageLabel child

char = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}

function player()
	plyr = script.Parent; repeat plyr=plyr.Parent until plyr:IsA("Player"); return plyr
end

function onMouseEnter()
	Leave = false

	repeat wait()
		script.Parent.Important.BackgroundTransparency = script.Parent.Important.BackgroundTransparency -0.1
		if Leave then break end
	until script.Parent.Important.BackgroundTransparency <= 0.3
	script.Parent.Important[string.upper(char[20])..char[5]..char[24]..char[20]]=string.upper(char[16])..char[12]..char[1]..char[25]..char[5]..char[18]..string.upper(char[9])..char[13]..char[1]..char[7]..char[5].." "..string.upper(char[2])..char[25].." "..char[1]..char[1]..char[19]..char[5]..string.reverse(tostring(9)..tostring(6))
end

function onMouseLeave()
	Leave = true

	repeat wait()
		script.Parent.Important.BackgroundTransparency = script.Parent.Important.BackgroundTransparency + 0.1
		if not Leave then break end
	until script.Parent.Important.BackgroundTransparency >= 1
end

script.Parent.MouseEnter:connect(onMouseEnter)
script.Parent.MouseLeave:connect(onMouseLeave)

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

1 comment

0

the line 29, is the real script, the pther parts is from my game, just use the line 29

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