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: How to get a player based on a variable?

Previous Thread :: Next Thread 
wackeyhd5cool is not online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
27 May 2016 10:05 PM
Is there a way to find a certain player based on a variable such as "x" rather than the script assuming you want to find a player literally named "x"? If so, please share with me how to do this.




Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
27 May 2016 10:06 PM
game.Players["x"]
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
27 May 2016 10:07 PM
If you mean x is a variable name, not the player name:
game.Players[x]
Report Abuse
wackeyhd5cool is not online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
27 May 2016 10:09 PM
Workspace.Script:15: bad argument #2 to '?' (string expected, got Object)


Report Abuse
wackeyhd5cool is not online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
27 May 2016 10:09 PM
Wait, I see. Thank you.


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