treebee63
(treebee63)
#1
I would like to get my roblox player ID while in studio using the command line.
In team create, you can get your local player with
print(game.Players.LocalPlayer)
Then grab the UserID.
However, in games with team create disabled, it returns nil.
keith_220
(keith_220)
#3
You can just use your player name or you can have the names and ids listed
for _, Player in ipairs(game.Players:GetPlayers()) do
print(tostring(Player.UserId).." - "..Player.Name)
end
treebee63
(treebee63)
#4
I’m in a local game (local save file of studio) so GetPlayers doesn’t return anything.
keith_220
(keith_220)
#5
ohhh. You can’t do it in a local file through command bar. You can however use it in a script.
check out studio service, i think it has a way to get the local plr
im on mobile sorry
keith_220
(keith_220)
#7
They’re right. You can use GetUserId
2 Likes
system
(system)
Closed
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.