I'm building a FPS game and I want to assign only one player to 1 team,and the other 14 to another. Is there any script that will do this
COMMUNITY QUESTION
How do I randomly assign players to different teams?
1 answer
This website is for help debugging any scripts you've already written, or for help understanding a concept. This question is too vague, and does not include your team setup or any other things you have already tried. We will do our best to help when things go wrong, but it seems like you've put little or no effort into trying to do this on your own. Here's what you could try:
1: Get the children of game.Players
2: Use math.random to select a random player
3: Assign the selected player to Team 1
4: Use a for loop to assign all other players to team 2
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
This is not a request site.
I'm sorry but I'm very new to scripting and don't know much about it...but I could use the information below to figure out how to make it work