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

Help with UserId's?

Asked by
pk008 15
9 years ago

I want to create a Gui that lets a player follow another player through a universe. How would I find the UserId of a player from their username? Apocalypse Rising has an example of what I am looking for. http://www.roblox.com/games/1600503/Apocalypse-Rising

2 answers

Log in to vote
0
Answered by
3dsonicdx 163
9 years ago

What your looking for is this.

game.Players:GetUserIdFromNameAsync()

in the () put the username inside of it, and it will return the UserID.

0
Thank you so much!! It works perfectly! pk008 15 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

Depending on where the gui is, you can simply just do script.Parent.Parent.Parent.UserId (Or where the Parent.UserId ends) until you get the actual player. Or, use game.Players.LocalPlayer.UserId Should get the UserId.

Answer this question