generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Get username from playerid?

Previous Thread :: Next Thread 
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Apr 2016 08:08 PM
easiest way possible?
Report Abuse
LuaLlama is not online. LuaLlama
Joined: 25 Jan 2014
Total Posts: 1123
06 Apr 2016 08:10 PM
http://wiki.roblox.com/index.php?title=API:Class/Players/GetPlayerByUserId

I believe this is what you're looking for. There are examples if you get stuck.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
06 Apr 2016 08:10 PM
i swear there's a method for this but i can't find it
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
06 Apr 2016 08:11 PM
omg what luallama said
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Apr 2016 08:11 PM
lua, the player is most likely not still in the game
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
06 Apr 2016 08:11 PM
httpservice
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Apr 2016 08:12 PM
httpservice doesnt work on roblox's website and I don't know how to use it
Report Abuse
LuaLlama is not online. LuaLlama
Joined: 25 Jan 2014
Total Posts: 1123
06 Apr 2016 08:14 PM
Oh, oops. Sorry, can't help ya.
Report Abuse
Lua_Basics is not online. Lua_Basics
Joined: 04 Jun 2012
Total Posts: 9977
06 Apr 2016 08:16 PM
if player.UserId == 1234566 then
Report Abuse
regentia is not online. regentia
Joined: 07 Feb 2011
Total Posts: 66
06 Apr 2016 08:16 PM
local Players = game:GetService'Players'


function getNameFromUserId(userId)
if (userId and type(userId) == "number") then
local Success,Error = pcall(function() return Players:GetNameFromUserIdAsync(userId) end)
if Success then
return Error
else
assert(Success,Error)
end
end
end
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Apr 2016 08:16 PM
if you are going to reply please read what I posted first lol they are not in the game
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
06 Apr 2016 08:40 PM
thanks regentia it worked
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
06 Apr 2016 08:43 PM
even when player is gone?
Report Abuse
regentia is not online. regentia
Joined: 07 Feb 2011
Total Posts: 66
06 Apr 2016 08:44 PM
you're welcome
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
06 Apr 2016 08:50 PM
If you wanna use httpservice use roblox's api for this:

http://api.roblox.com/Users/1

http://wiki.roblox.com/index.php?title=Web_APIs#Get_username_from_ID
Report Abuse
rLuaRBLX is not online. rLuaRBLX
Joined: 04 Jan 2016
Total Posts: 70
06 Apr 2016 09:07 PM
Probably using HTTPSERVICE with Roblox's APIs are the easiest way. Once you learn it, it sticks with you, and it's pretty cool. For example, I made an in-game notification when my twitch stream goes live
Report Abuse
RoQuick is not online. RoQuick
Joined: 12 May 2013
Total Posts: 595
06 Apr 2016 09:13 PM
lol
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image