Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ 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.