We use cookies on this site to enhance your user experience
Collapse Sidebar


GetNameFromUserIdAsync will send a query to the Roblox website asking what the username is of the account with the given Player/UserId|user Id. This function does not cache; it always sends a web request even if a user ID was already queried or if the player is already connected to the server (and thus has their username exposed).

This method errors if no account exists with the given user ID. If you aren’t certain such an account exists, it’s recommended to wrap calls to this function with pcall. In addition, you can manually cache results to make future calls with the same user ID fast. See the code samples to learn how to do this.


Name Type Default Description

The userId of the player being specified.


Return Type Summary

The name of a user with the specified userId.