-- 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)
Success:
Essentials: The username of userId 189051237 is Femtrs
Failed:
Essentials: Failed to retrieve username from the assigned userId
Parameters
userId:
The specified players userId.
Sends an output log to your output window and developer console.