I've been trying to make a script that can detect how many people are on a team and if there is less than or equal to one person on a team.
This is what I've gotten so far but have no idea what to do and i'm stuck. Here is the script.
teams = game.GetService("Teams") team1 = teams.Playing local team1players
function onGameEnd()
team1players = team1:GetChildren()
if #team1players < 2 then
print("players less than 2")
end end

1 comment
I changed the code to this change the function to while true do and I still get no output in the console even when Team1Players is less than or equal to one.