When using various endpoints, you might notice that instead of receiving usernames directly, you receive numeric IDs.

To convert these IDs into meaningful information, you can use Roblox’s user and asset endpoints.

Converting User IDs to Usernames

In Roblox, you can convert a user ID to a username using the Players service. Here’s an example of how you could do it:

username.lua
local Players = game:GetService("Players")
local user_id = 1498851024 -- Replace with the ID of the user

-- Retrieve the username from the user ID
local username = Players:GetNameFromUserIdAsync(user_id)

-- Output the username to the console
print(username)

If you’re working outside of Roblox, you can achieve the same result using their API endpoint:

Roblox User Endpoint

Getting Thumbnails

If you’re working within Roblox, you can use the provided thumbnail ID directly in your scripts. Here’s an example script, parent it to a Decal.

Make sure to include “rbxassetid://” in front of the ID.
thumbnail.lua
local thumbnail_id = 124996194907131 -- Replace with the thumbnail ID

-- Set the texture using the thumbnail ID
script.Parent.Texture = "rbxassetid://" .. thumbnail_id

For external use, you can leverage Roblox’s asset API to fetch thumbnails: