I have a question about coding player count,I used Players.NumPlayer but it says NumPlayer not part of Players so how do I count players?
✓ ANSWER ACCEPTED
How do you code player count?
1 answer
✓ Accepted answer
--\\ Services //--
local players = game:GetService("Players")
--\\ Values //--
local numPlayers = players.NumPlayers -- does the same thing below but in 1 line of code
local player_tab = players:GetPlayers() -- returns a table/array of players
local numPlayers2 = (#player_tab) -- get the number of players from the table/array
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
It's NumPlayers. Make sure that you're trying to use the right property.
kk The code is here https://scriptinghelpers.org/questions/24577/why-is-my-map-choosing-script-not-working