I'm trying to make a GUI that has the player's avatar image on it. I have seen it in games like Bloxburg, but have no idea how to do it. Any idea how to do it?
COMMUNITY QUESTION
How to get the player's avatar image into GUI?
1 answer
You will want to use one of these API endpoints that can be found here.
Regular
https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username=ROBLOX
https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&userId=1
Endpoints
https://www.roblox.com/bust-thumbnail/image?userId=1&width=420&height=420&format=png
https://www.roblox.com/headshot-thumbnail/image?userId=1&width=420&height=420&format=png
https://www.roblox.com/outfit-thumbnail/image? userOutfitId=1&width=420&height=420&format=png
https://www.roblox.com/asset-thumbnail/image?assetId=1&width=420&height=420&format=png
For example if I have a player object player.
local player
local imagelabel = Instance.new("ImageLabel")
imagelabel.Image = "https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username="..player.Name
imagelabel.Image = "https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&userId="..player.UserId
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
how come i never knew that ;-;
I just discovered it this afternoon. Always remember to look for things that might lead you to the right answer. For example, I searched for "Web Apis" on this one after I saw that a search for "avatar" wasn't giving me anything.