how do i let only 1 person be on a team, and how do you change the team with some code. i'm not asking for a script, im asking on how i would make a script for these.
✓ ANSWER ACCEPTED
help on teams?
1 answer
✓ Accepted answer
I would recommend that you do this with a table. Using a table you can edit the teams.
local tab= {}
table.insert(tab, #tab+ 1 or 1, player)-- add the player into the table
-- if you want to find what the table has then you could use a for loop
for i,v in pairs(tab) do
--i = number in table
-- v = item in table,so in this case the player
end
If you want to learn more advanced usages for tables you can go to this link.
http://wiki.roblox.com/index.php?title=Function_dump/Table_manipulation http://wiki.roblox.com/index.php?title=Table
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
sorry worded this question completely wrong