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 » Scripting Helpers
Home Search
 

Re: How would this random player script go?

Previous Thread :: Next Thread 
Clickest is not online. Clickest
Joined: 06 Aug 2013
Total Posts: 6504
02 May 2014 04:56 PM
So-far I have

local random = game.Players[math.random(1, #players)]

Meaning it would find a random player from 1, to the number of players, right?
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
02 May 2014 04:56 PM
local random = game.Players:GetChildren()[math.random(1,#game.Players:GetChildren())]
Report Abuse
L0cky2013 is not online. L0cky2013
Joined: 30 Jul 2012
Total Posts: 1446
02 May 2014 04:59 PM
@Sensei, Players:GetPlayers()
Report Abuse
Clickest is not online. Clickest
Joined: 06 Aug 2013
Total Posts: 6504
02 May 2014 04:59 PM
players was defined as game.Players:GetChildren(), sorry forgot to mention that :P

But uh, i forogt to do that first part :) Ty
Report Abuse
Clickest is not online. Clickest
Joined: 06 Aug 2013
Total Posts: 6504
02 May 2014 05:00 PM
Worked, ty
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
02 May 2014 05:00 PM
Why GetPlayer(), nothing else would ever go into Players..
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
02 May 2014 05:01 PM
gawd..

Random = game.Players:GetPlayers()[math.random(game.Players:GetPlayers())]

don't talk if you don't know what GetPlayers() is..
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
02 May 2014 05:04 PM
I know what it is, but does it matter, nothing else goes into players..
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
02 May 2014 05:16 PM
you have no evidence to support your statement, therefore you are wrong.

#nerdsunited
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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