Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there anyway to get a player's name from their user Id if they are not in the server?

Asked by
ExcelUp 24
5 years ago

At the moment I have attempted to use:

local playerName = game.Players:GetPlayerByUserId(19497313)

which works just fine, as long as the player is in the server.

Is there a way that I can get the player's name from their user Id, without them being in the server?

1 answer

Log in to vote
0
Answered by 5 years ago
print(game.Players:GetNameFromUserIdAsync(19497313))
0
Thank you, but is there a way to use functions such as 'IsInGroup', without the player being in the server? ExcelUp 24 — 5y
0
No, because :IsInGroup() is called on a player object, which you can't get if the player isn't in the game. Please accept the answer if it helped Gey4Jesus69 2705 — 5y
Ad

Answer this question