Learn
Engine Class
UserService
Not Creatable
Service

Summary
Inherited Members

API Reference
Methods
GetUserInfosByUserIdsAsync
Yields
Capabilities: Basic
UserService:GetUserInfosByUserIdsAsync(userIds:{any}):{any}
Parameters
userIds:{any}
Returns
Code Samples
UserService:GetUserInfosByUserIdsAsync Example
local UserService = game:GetService("UserService")
local success, result = pcall(function()
return UserService:GetUserInfosByUserIdsAsync({ 156, 1, 735878936 })
end)
if success then
for _, userInfo in ipairs(result) do
print("Id:", userInfo.Id)
print("Username:", userInfo.Username)
print("DisplayName:", userInfo.DisplayName)
end
else
-- An error occurred
end

GetUserFromGlobalUserIdAsync
Yields
Capabilities: Basic
UserService:GetUserFromGlobalUserIdAsync(userId:number):User
Parameters
userId:number
Returns
Code Samples
Get User From Global User Id Async
local UserService = game:GetService("UserService")
local user = UserService:GetUserFromGlobalUserIdAsync(globalUserId)
print(user.Id) -- Domain user ID for this experience
print(user.DomainType) -- Enum.DomainType.EXPERIENCE
print(user.DomainId) -- Current universe ID

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.