Hey scriptinghelpers, I have a max 10 players with 10 teams, and I'm looking to put 1 player per team. From what I understand on https://developer.roblox.com/en-us/api-reference/class/Team it says "When a Player joins a game, they will be allocated to the team with Team.AutoAssignable set to true that has the fewest players. If no auto assignable team is available, Player.Neutral will be set to true". Since I can't test it myself for two reasons, my computer is NOT fast enough to run 10 different players (I'm just a poor boy doing this as a hobby) and, it will only let me test 8 different players. How would I achieve my goal of putting 1 player per team (10 max players 10 teams). Does it do automatically in my case or, do I need a script for this?
Thanks for the help in advance, I really appreciate it. I'm only here to learn! Side note: A lot of the stuff I'm doing now I'm extremely new to it so I don't actually know everything yet. This would be my first time actually using teams. Also somebody might say "this isn't a scripting question" but, it actually is. I'm wondering if I need scripting for it or, of it's automatic. I don't understand since, I can't test it and I don't have friends who will test it with me.
I've actually been looking at sample code and models but, I'm not finding the answer to my question. It would be on player added (like it says in the title) NOT on player touched because, this isn't for a tycoon. I need the colors from the teams for a tool I'm working on. Meaning I'm assigning a different color to each player.

7 comments
so yes, it will automatically do it for you, however you have to watch out since there is a smol chance for the auto assign to put a player's team into a team that is already occupied
Hey there NGC4637, thank you for the response and help! I'm getting an error on output on line 9 that states the following. " ServerScriptService.Script:9: invalid argument #2 to 'remove' (number expected, got Instance)", I'm new to tables so, I don't fully understand it.
so uh i've edited the script, hope this helps
One second, I'm going to test it out. I just got back/home. I'll let you know ASAP.
Ok so, I tested it out. I got an error on output on line 15 that says "ServerScriptService.Script:15: invalid argument #2 to 'remove' (number expected, got Instance) - Server - Script:15". How do I make v in pairs a number instead of instance? I actually tried some stuff out. Would it be #playersInTeam since v is the team? I'm not sure right now.
i see my mistake now. I am supposed to select the item's position on the table, so just replace v with i.
Hey sorry for the late response. Sweet, it works, thanks NGC4637. I really appreciate the help.