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

How do I make this image change to the avatar of the name put into the textbox by the player?

I would like to know how to make this surface GUI image label change to the avatar of the name that is put into the textbox on a screengui by a player in-game. I am leaving out all the variables to make it easier to read.

Script:

game.Players.PlayerAdded:Connect(function(main)
	box1avatar.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=150&y=200&Format=Png&username=" .. game.StarterGui.announcementholder.Frame.name
end)

1 answer

✓ Accepted answer

You can use

GetUserIdFromNameAsync

Example:

local player = (textbox.Text)

local userId = Players:GetUserIdFromNameAsync(player)

print(userId)

5 comments

0

Where?

0

I edited my post

0

Thank you

0

No problem :D

0

If you need help just answer

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