Getting the DisplayName from a player that isnt in the game

I’m making a leaderboard in my game and I want it to show the players display name
With a leaderboard the player isnt in the game, so you cant do

player.DisplayName

Roblox studio also doesnt offer a function to access the displayname, something like this wouldve been useful

game.Players:GetDisplayNameFromUserId()

https://users.roblox.com/v1/users/1460664250
This is an example of where I get the display name from

The only solution I tried was HttpService, but if the leaderboard updates every 60 seconds, HttpService takes a while to actually get the data, or try to decode the data.

Is there a way I can access the players display name without them being in the server, or http service?

This actually does exit! It’s Players | Roblox Creator Documentation.

That’s not what OP asked for, :GetNameFromUserIdAsync returns the username of a valid PlayerId, not the displayname of the player.

1 Like

I know, but it only returns the username, and not display name

Look this:

6 Likes