Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I know the number of players in a team?

Asked by 6 years ago

I have no idea where to start with this. I have no code... But does anyone know how I can know the number of players in a team? Thank you so much for the help!

I really do appreciate it!

1 answer

Log in to vote
0
Answered by 6 years ago

You can simple do:

local Team = game:GetService("Teams").Red
local num = #Team:GetPlayers()
print(num) -- Outputs the number of players on the team.
Ad

Answer this question