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

How do you print a player's ID to the computer?

Asked by
Irvene 5
9 years ago

Without putting the playerID there, how can you print a players ID, from the site, to the computer like

print("Hello world")

How can you print the userID of anyone?

1 answer

Log in to vote
1
Answered by
bbissell 346 Moderation Voter
9 years ago

You can do this by calling for the Player's UserId. Here is an example:

player = game.Players.bbissell --Path of the player
print(tostring(player.UserId)) --Prints string version of the UserId

If you are looking for a way to get the User ID by looking it up on the ROBLOX site, For instance, If I am not in your game but you want your script to get my userID, You are able to do that via HttpService.

2
It is perfectly possible. Assuming you know their name, you could use HTTP service. iaz3 190 — 9y
0
^ Approved Nickoakz 231 — 9y
0
There. I modified it. bbissell 346 — 9y
Ad

Answer this question