Get an instance of the specified team||doc135777

September 20, 2022

Format

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

Description

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


Parameters

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


Code Samples

local team = Game.GetTeam(1, true)