Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

help on teams?

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.

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

1 comment

0

sorry worded this question completely wrong

This discussion is preserved as it was. New answers, comments, and votes are closed.