PcoWSkbVqDnWTu_dm2ix
The information on this page may no longer be accurate. To see the latest, go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar

GetNameFromUserIdAsync

The GetNameFromUserIdAsync Players function will send a query to the Roblox website asking what the username is of the account with the given Player/UserId|UserId.

This method errors if no account exists with the given UserId. 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 UserId fast. See the code samples to learn how to do this.

Parameters

Name Type Default Description

The Player/UserId of the player being specified

Returns

Return Type Summary

The name of a user with the specified Player/UserId


Code Samples


Playing in Third Person

This example demonstrates how to change the character’s CameraMode to third person using the Classic value of the Enum/CameraMode enum.