I'm trying to find a player's user ID from their name, but here's the catch. They aren't in the game. How would I do this? I know there's an API for it but you can't access RBLX API's from Studio. Does anyone know how to do this?
Thanks
I'm trying to find a player's user ID from their name, but here's the catch. They aren't in the game. How would I do this? I know there's an API for it but you can't access RBLX API's from Studio. Does anyone know how to do this?
Thanks
So I know this is answered in the comments, but I don't know why people don't just answer in the answer section:
game.Players:GetUserIdFromNameAsync(1) -- I just used 1 because it is easy
Thanks. I knew there was a function like this but I thought that the player had to be in the game.
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
to get the playersID from their name you will need to use the HttpService but here is the catch it will not allow calls to its own api. The web api can help you get the info you want http://wiki.roblox.com/index.php?title=Web_APIs#Get_ID_from_username but you will need to find a proxy to make the call
How would I use proxies on it?
@BlixBlocker Use something like the google proxy, it's the most popular.
Or you could just use game.Players:GetUserIdFromNameAsync()
http://wiki.roblox.com/index.php?title=API:Class/Players/GetUserIdFromNameAsync