Xsysix
|
  |
| Joined: 29 Mar 2014 |
| Total Posts: 1182 |
|
|
| 08 Jun 2014 02:58 PM |
local Plr = game.Players:GetChildren()[math.random(game.Players.NumPlayers)]
Would this choose a random player?
- Add 1.5k | Deplexity | its a lego men game stop worrying |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
Xsysix
|
  |
| Joined: 29 Mar 2014 |
| Total Posts: 1182 |
|
|
| 08 Jun 2014 02:59 PM |
Awesome
- Add 1.5k | Deplexity | its a lego men game stop worrying |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 08 Jun 2014 03:01 PM |
no it should error or do nothing, unless roblox changed.
it should be 1,game.Players.NumPlayers |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2014 03:03 PM |
| His line is perfectly fine. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 08 Jun 2014 03:05 PM |
Roblox was never changed. Learn how tables work: http://lua-users.org/wiki/TablesTutorial |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 08 Jun 2014 03:06 PM |
| How he did it does work, but most people prefer 1, game.Players.NumPlayers for random players |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 08 Jun 2014 03:34 PM |
| Actually, many times in the past I've tried things such as this; ex. math.random(5)- and it did not work. |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2014 03:35 PM |
math.random with one argument works just fine.
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 08 Jun 2014 03:38 PM |
cr, it always worked fine. You probably did something like math.random(5, 0) or something |
|
|
| Report Abuse |
|
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 08 Jun 2014 04:52 PM |
| Ehh, probably. Cnt, can you help me with something? For someone it has 73 views but no responds.. http://www.roblox.com/Forum/ShowPost.aspx?PostID=136404661 |
|
|
| Report Abuse |
|
|