Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I get number of children in players?

Im using:

for _,player in next, game.Players:GetChildren() do

But I need to get the number of children there are.

1 answer

✓ Accepted answer

if you wanna get the current number of players

print(game.Players.NumPlayers)

or if you wanna loop through every player

for i, v in pairs(game.Players:GetPlayers()) do
	--BLAH
end

that +1 :D

This discussion is preserved as it was. New answers, comments, and votes are closed.