GetNameFromUserIdAsync

This function returns the players username from the given userId.

Example Usage:

-- Getting ReplicatedStorage service
local ReplicatedStorage = game:GetService("ReplicatedStorage")

-- Referencing Essentials
local Essentials = require(ReplicatedStorage.Essentials)

-- Creating a variable of the userId of the player we want to get the username of
local userId = 189051237

-- Getting the username from the userId given
Essentials.GetNameFromUserIdAsync(userId, true)

Parameters

userId: number

The specified players userId.

How to retrieve the userId of a player via their Roblox Profile

debugging: bool

Sends an output log to your output window and developer console.

References

Last updated