SpawnLocation
Defines a player spawn position and team restrictions.
- Creatable
Instance.new("SpawnLocation")- Inherits
- PartBasePartPVInstanceInstance
- Replication
- Standard
Behavior
SpawnLocation is a part on which players can spawn. When several eligible spawn
locations exist, the engine selects one. Without a spawn location, players spawn
at the origin.
When Neutral is false, TeamColor restricts the spawn to the matching team.
Summary
Whether touching this spawn changes a player’s team to the team identified by TeamColor.
The spawn location's angular velocity around each axis.
The duration of spawn forcefield protection, in seconds.
Whether this spawn location is available.
The spawn location's linear velocity in studs per second.
Whether players from any team can spawn here.
The team color used to match eligible players when Neutral is false.
Properties
AllowTeamChangeOnTouch
SpawnLocation.AllowTeamChangeOnTouch: boolean = falseWhether touching this spawn changes a player’s team to the team identified by TeamColor.
AngularVelocity
SpawnLocation.AngularVelocity: Vector3 = Vector3.new(0, 0, 0)The spawn location's angular velocity around each axis.
Duration
SpawnLocation.Duration: number = 10The duration of spawn forcefield protection, in seconds. Set to 0 to disable protection.
Enabled
SpawnLocation.Enabled: boolean = trueWhether this spawn location is available.
LinearVelocity
SpawnLocation.LinearVelocity: Vector3 = Vector3.new(0, 0, 0)The spawn location's linear velocity in studs per second.
Neutral
SpawnLocation.Neutral: boolean = trueWhether players from any team can spawn here. Set to false to restrict spawning by TeamColor.
TeamColor
SpawnLocation.TeamColor: BrickColor = BrickColor.new(194)The team color used to match eligible players when Neutral is false.
Inherited members
- Properties
- CanQueryCanSeparateCanTouchCastShadowCenterOfMassCollisionFidelityCollisionGroupColorCoordinateFrameElasticityFaceCountFrictionGravityScaleLockedMassMasslessMaterialSetMaterialVariantPositionRotationShapeSizeSmoothingAngleTextureIdTriangleCountVertexCountVisibilityMask
- Methods
- ApplyAngularImpulse()ApplyImpulse()ApplyImpulseAtPosition()GetContacts()GetExecutionGroup()GetMass()GetMesh()GetNetworkOwner()GetNetworkOwnershipAuto()GetVelocityAtPosition()Intersect()MakeEditable()Separate()SetMesh()SetNetworkOwner()SetNetworkOwnershipAuto()Subtract()Union()
- Events
- TouchedTouchEnded
- 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 spawn = Instance.new("SpawnLocation")
spawn.Anchored = true
spawn.Neutral = true
spawn.Parent = workspace