When calling the Players:GetUserThumbnailAsync() API on the client side using a Scoped User, it does not work as expected.
From observation, it seems the User Id is not being appended to the rbxthumb:// string and is instead defaulting to 0, causing the thumbnail to be blank.
This behaviour is only present client sided, and works as normal when GetUserThumbnailAsync is used in a server script instead.
Example code used:
local Players = game:GetService("Players")
local Gui = script.Parent
local ImageLabel = Gui:WaitForChild("ImageLabel")
local success, Thumbnail, IsReady = pcall(function()
return Players:GetUserThumbnailAsync(
Players.LocalPlayer.User,
Enum.ThumbnailType.AvatarBust,
Enum.ThumbnailSize.Size180x180
)
end)
if success then
ImageLabel.Image = Thumbnail
end
Steps to reproduce:
- Create a
ScreenGuiin StarterGui including anImageLabeland aLocalScript - Insert the example code above inside the LocalScript
- Run the game
- The ImageLabel will be blank instead of showing the thumbnail.