GetTeams (Method): Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy No edit summary |
>MrNicNac Added an example. |
||
Line 7: | Line 7: | ||
{{clear floats}} | {{clear floats}} | ||
{{Example|This is an example of using the method above to get all the teams and remove them. Includes the generic for loop. | |||
<pre> | |||
local TeamTable = Game:GetService("Teams"):GetTeams() | |||
for i,k in pairs(TeamTable) do | |||
k:Remove() | |||
end | |||
</pre> | |||
}} | |||
[[Category:Methods]] | [[Category:Methods]] |
Revision as of 14:18, 27 December 2010
Example
This is an example of using the method above to get all the teams and remove them. Includes the generic for loop.
local TeamTable = Game:GetService("Teams"):GetTeams() for i,k in pairs(TeamTable) do k:Remove() end