I am in the process of making a Roblox Global leaderboard which I will be using for my game, I was wondering if it is possible to load the players on the leaderboards Roblox icon, if anyone can send information or link any articles regarding this I would appreciate it
Set the relevant ImageLabel’s ImageLabel.Image to the content ID returned by the function.
The Developer Hub’s code sample explains this pretty well:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
-- Fetch the thumbnail
local userId = player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
-- Set the ImageLabel's content to the user thumbnail
local imageLabel = script.Parent
imageLabel.Image = content
imageLabel.Size = UDim2.new(0, 420, 0, 420)