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 randomly pick a player in game.Players?

Previous Thread :: Next Thread 
Definites is not online. Definites
Joined: 02 Nov 2015
Total Posts: 163
06 May 2017 10:24 PM
How would I math.random that?


Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
06 May 2017 10:25 PM
:GetPlayers() and same way you would through other tables


Report Abuse
Definites is not online. Definites
Joined: 02 Nov 2015
Total Posts: 163
06 May 2017 10:33 PM
shouldnt it be getcheildren?


Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
06 May 2017 10:38 PM
:GetPlayers() is a method of game.Players


Report Abuse
Definites is not online. Definites
Joined: 02 Nov 2015
Total Posts: 163
06 May 2017 10:40 PM
ik ik ik I tested my method and then urz...


soo yee....


Report Abuse
EternaIGod is not online. EternaIGod
Joined: 01 Apr 2011
Total Posts: 23592
06 May 2017 10:53 PM
:GetPlayers() is an easier way, I have no idea why you're still using :GetChildren()


Report Abuse
ImVortexe is not online. ImVortexe
Joined: 26 Jan 2013
Total Posts: 1149
06 May 2017 11:03 PM
players = game.Players:GetPlayers()
for i =1,#players do
found = players[math.random(1,#players)]
print(found.Name)
end
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