GetTeams (Method)

From Legacy Roblox Wiki
Revision as of 22:28, 13 January 2011 by >Blocco
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
GetTeams( )
Returns Table teams
Description: Returns a table of all of the teams.
Member of: Teams


Example
local teams = Game:GetService("Teams"):GetTeams()

if #teams > 0 then
   print( "There are " .. #teams .. " teams." )
   print( "They are as follows:" )
   for i = 1, #teams do
      print( "Team " .. i .. ": " .. teams[i].Name )
   end
else
   print( "There are no teams!" )
end