Hello! Can someone help me with getting a specific player avatar in Roblox because I’m having problems.
Do you mean in studio? If so there is a plugin for it.
Yes in studio.
What’s the plugin name?
Bit Jank but it still works. (By jank i mean you have to move individual parts of the body)
There are prob better options but not sure where atm
Gui.
Chars.
Profile image? As in like, set an ImageLabel to the avatar?
https://developer.roblox.com/en-us/api-reference/function/Players/GetUserThumbnailAsync
local plr = game.Players.LocalPlayer
local id = plr.UserId
local Players = game:GetService("Players")
local ThumbType = Enum.ThumbnailType.AvatarThumbnail --can also be headshot or avatarbust as well
local ThumbSize = Enum.ThumbnailSize.Size150x150 -- many diff sizes
local plrAvatar, isReady = Players:GetUserThumbnailAsync(id, ThumbType, ThumbSize) --use getUserThumbnailAsync
script.Parent.Image = plrAvatar -- set UserThumbnail
2 Likes
I’m trying to get someone’s not my own profile avatar.
You’d simply change id to another value. What did you have in mind exactly?
local plr = game.Players.LocalPlayer
local id = plr.UserId
local Players = game:GetService("Players")
local ThumbType = Enum.ThumbnailType.AvatarThumbnail --can also be headshot or avatarbust as well
local ThumbSize = Enum.ThumbnailSize.Size150x150 -- many diff sizes
local plrAvatar, isReady = Players:GetUserThumbnailAsync(id == "2752011450", ThumbType, ThumbSize) --use getUserThumbnailAsync
script.Parent.Image = plrAvatar -- set UserThumbnail
Simply set the id
at the top of the script to 2752011450
. It requires an integer, not a string as well.
local id = 2752011450
local Players = game:GetService("Players")
local ThumbType = Enum.ThumbnailType.AvatarThumbnail
local ThumbSize = Enum.ThumbnailSize.Size150x150
local plrAvatar, isReady = Players:GetUserThumbnailAsync(2752011450, ThumbType, ThumbSize) -- you could use the declared id variable or simply enter it here, to showcase both I put what it would look like if you used the ID like this instead of defining in a variable
script.Parent.Image = plrAvatar
6 Likes
ohh thought u meant model. Thanks for the clarification.