Teams
Contains Team instances for a place.
- Service
game:GetService("Teams")- Inherits
- Instance
- Replication
- Never
Behavior
Teams contains Team instances. Players are neutral when the place
has no teams.
Summary
Members2
Methods2
Returns this instance if it is an ExecutionGroup.
Returns an array of child Team instances.
Methods
GetExecutionGroup
Teams:GetExecutionGroup(): ExecutionGroup?Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.
GetTeams
Teams:GetTeams(): tableReturns an array of child Team instances.
Inherited members
Inherited47
Instance47
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying
Example
local Teams = game:GetService("Teams")
for _, team in Teams:GetTeams() do
print(team.Name)
endRelated APIs
Team · Players · SpawnLocation