|
| 26 Aug 2017 05:47 PM |
| I'm just about to finish a mini-game round script, it now it keeps bugging up.. There is a for-loop that starts running when there are 2 players online, and BREAKS when there's just 1 online. But every time 1 player leaves, and another joins, the for-loop is adding up once more, and starts doubling itself |
|
|
| Report Abuse |
|
|
WrathVoid
|
  |
| Joined: 20 Apr 2011 |
| Total Posts: 939 |
|
|
| 26 Aug 2017 05:47 PM |
| use game.Players.NumPlayers |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2017 05:50 PM |
| NumPlayers is deprecated, just do #game.Players:GetPlayers() or :GetChildren() |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2017 05:50 PM |
| There's nothing wrong with the amount of players, it is stored as an IntValue in ServerStorage, and is updated whenever a player joins/leaves :/ |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2017 05:50 PM |
@WrathVoid
That's deprecated Use game.Players:GetPlayers() |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2017 06:00 PM |
| I don't get this.. why does it add up even when I break it?? |
|
|
| Report Abuse |
|
|