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

How to check the amount of players in game?

I am trying to kick someone if the player number exceeds the limit but don't know what function is used to get players

1 answer

print(#game:GetService("Players"):GetPlayers())

That get's the length of the players table which is retrieved with the GetPlayers method of the Players service

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