How do I make the game end when there is only one person left on a team

Try this guide, hopefully it’s helpful: