Need help with finding the number of players in a team

Hello I’m trying to find the number of players in a team in my game. When you join my game your team will be auto assigned to “Choosing” but for some reason this keeps printing 0

while wait()do
	print(#game.Teams.Choosing:GetChildren())
end

does anyone know how i can fix this? it keeps printing 0 even when there are players on the “Choosing” team

To get players assigned to the team you need to use GetPlayers function. GetChildren returns the actual children of the instance.
https://developer.roblox.com/en-us/api-reference/function/Team/GetPlayers

2 Likes

Thank you so much it is now working