int GetUserIdFromNameAsync ( string userName )
I need an example of how it's done. Could someone try printing an ID in an example, please?
http://wiki.roblox.com/index.php?title=API:Class/Players/GetUserIdFromNameAsync
int GetUserIdFromNameAsync ( string userName )
I need an example of how it's done. Could someone try printing an ID in an example, please?
http://wiki.roblox.com/index.php?title=API:Class/Players/GetUserIdFromNameAsync
I assume you mean how do you call that function from within a pcall from your title.
Like any other way!
pcall(function()
-- getuseridfromnameasync is a function of game.Players
local userid = game.Players:GetUserIdFromNameAsync("RevergeHelps")
-- print the result of the above function to output
print(userid)
end)
As this is within a pcall, it will keep running even if it errors.
https://wiki.roblox.com/index.php?title=Pcall
https://wiki.roblox.com/index.php?title=API:Class/Players/GetUserIdFromNameAsync
This discussion is preserved as it was. New answers, comments, and votes are closed.