エンジンクラス
UserService
*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。
概要
方法
GetUserInfosByUserIdsAsync(userIds: {any}):{any} |
GetUserFromGlobalUserIdAsync(userId: number):User |
APIリファレンス
方法
GetUserInfosByUserIdsAsync
パラメータ
戻り値
コードサンプル
UserService:GetUserInfosByUserIdsAsync の例
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("ユーザー名:", userInfo.Username)
print("表示名:", userInfo.DisplayName)
end
else
-- エラーが発生しました
end