GetUserThumbnailAsync issues

so whenever i try to use getuserthumbnailasync it loads my own avatar, but doesnt load other players

local Image, Loaded;
local Success, Error = pcall(function()
Image, Loaded = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420);
end)
2 Likes

It really depends what you’re trying to accomplish, where this script is, etc.

Judging by the code and your issue, this seems like it’s running in a local script, which will always make it your own avatar if the Player variable is short for LocalPlayer.

1 Like

its a serverscript inside serverscriptservice

1 Like

Can you share the rest of the code?

Try other thumbnail types, avatarburst/avatarbust [i forgot the correct name] should work better

task.spawn(function()
		local Image, Loaded;
		local Success, Error = pcall(function()
			Image, Loaded = game.Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.AvatarBust, Enum.ThumbnailSize.Size420x420);
		end)
		warn('--------------------');
		warn(Error);
		Poster.SurfaceGui.Frame.Background.PlayerIcon.Image = Image;
	end)
1 Like

tried, didnt work ------------------

1 Like

Since you’re not returning a value in the inner function of the pcall, the second return value is irrelevant unless the first return value is false in the case of an error. Your line of dashes and the corresponding error should print only when the pcall fails.

The second return value for the thumbnail method indicates if the thumbnail is ready. For some reason, you decided to name it “Loaded”. In an attempt to debug, please print out what “Loaded” is set to along with the ID of the user whose thumbnail is being fetched.

loaded is returning true or false whether or not it was loaded, for my avatar its always true, and for others its false, i put it in a pcall incase there was an error which there wasnt, it prints nil.

Is this done in a Team Test in Studio or in a live game?

live game, ive tested on multiple accounts aswell.

Have you tried implementing logic that retries the method until a thumbnail is finally ready to be shown in the poster?

yes i used repeat until loaded, loaded always returns false unless its my avatar

Are you sure the unloaded avatars haven’t been moderated?

how can they be moderated lol? they appear on roblox site not ingame

Could you provide the link to a profile whose thumbnail isn’t loading in your game?