Get an instance of the specified team||doc135777

September 20, 2022


 Game.GetTeam(id, create) 
  • The class to which the function belongs:Game


Returns the team instance of the specified team ID. If the team does not exist and the parameter create is true, a new team instance will be created and returned, otherwise it will return nil .

Value Returned

type Description
Team Team instance


Variable name type Description
id int team id
create boolean Whether to create when not available

Code Samples

local team = Game.GetTeam(1, true)