Answered by
6 years ago Edited 6 years ago
This is pretty easy, you get the children of players and then get the table size by putting a '#' for it
2 | return #game.Players:GetPlayers() |
6 | local Players = GetPlayers() |
If you have questions or I made a typo, just ask
(You can also count them, but this way is easier, if you want for example to only count players with a value inside them named 'InGame' you can do things like this)
03 | for i,v in pairs (game.Players:GetPlayers()) do |
04 | if v:FindFirstChild( 'InGame' ) and v:FindFirstChild( 'InGame' ).Value then |
05 | table.insert(Players, v) |
12 | local Players = GetPlayers() |