jaki619
|
  |
| Joined: 01 Jul 2014 |
| Total Posts: 63 |
|
|
| 31 Aug 2017 08:47 AM |
how i put a detector in a script tat detects how much players r in the game...like if there is 1 player then do this event..if there r 3 players..then do the other one...etc.. Thanks alot! and i appreciate any help :D |
|
|
| Report Abuse |
|
|
Wrathsong
|
  |
| Joined: 05 Jul 2012 |
| Total Posts: 22393 |
|
|
| 31 Aug 2017 09:05 AM |
#game.Players:GetPlayers()
getplayers returns a table, # is the length operator
|
|
|
| Report Abuse |
|
|
wpled
|
  |
| Joined: 28 May 2011 |
| Total Posts: 413 |
|
|
| 31 Aug 2017 09:06 AM |
print(#game.Players:GetPlayers())
local amount = #game.Players:GetPlayers()
if amount == 1 then --do whatever elseif amount >= 3 then --do whatever end
|
|
|
| Report Abuse |
|
|