I have found that the Teams object does not have a property of "Players", so the counteract that. I just made a table, and a value gets added the that table when a person joins the tables team. My variables for the tables are: BravoPlayers: #_G.BravoPlayerAmount AND AlphaPlayers: #_G.AlphaPlayerAmount . Right now i'm having a very hard time finding the formula I need. I have tried things but they don't seem to work. Here's the layout of it tho:
if BravoPlayers {formula} == AlphaScore + DIFF then
-- Let player join team
else
print(" Team has too many players on it, don't join")
end
The diff value = 2, -- If you could make it where you have this into the code. What diff tells it is, say Bravo team and Alpha team have 0 players. Then 2 players join Bravos Team, if another player (3rd player) tried to join the bravo team, it would print("Team has too many players on it, don't join"), therefor making the player have to join Alphas team, so one team does not get WAY too much players
Of course the code above is wrong, but if you can tell me what I need to do, I would be very thankful. If you have any questions about this then just go ahead and post them. Ill try to reply as fast as I can. Thanks for reading (:

2 comments
Thanks for your attempt but it's very.. well unorganised, and I just need the formula . If you could on the for i,v in next part, what does 'next' do?
It basically just goes through every index in the table.