Detecting on how much players are on the team?

How do i detemine how much players are on the specific team because i want to achieve if 13 users are on the blue team then return end,
Any answer is appreciated
(Sorry my grammar isn’t good enough)

1 Like

I think you may be able to loop through the teams

1 Like
#game.Teams.TEAMNAME:GetPlayers()

will return how many players are in this team.

1 Like

adding on to what @AtomTostcuOzgurUsta said

if #game.Team.Blue:GetPlayers() == 13 then return end
2 Likes
-- count how many players are on each team
local teams = game:GetService("Teams"):GetTeams()
for _, team in pairs(teams) do
    local players = team:GetPlayers()
    print("Team " .. team.Name .. " has " .. #players .. " players")
end

Does this answer your question? If so make sure to give me the solution button! :smile: