Open Asterune
SpawnLocation

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

Members7
Properties7

Properties

AllowTeamChangeOnTouch

SpawnLocation.AllowTeamChangeOnTouch: boolean = false

Whether 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 = 10

The duration of spawn forcefield protection, in seconds. Set to 0 to disable protection.

Enabled

SpawnLocation.Enabled: boolean = true

Whether 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 = true

Whether 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

Inherited109
Properties
AnchoredBackSurfaceBottomSurfaceCanCollideCFrameCustomPhysicalPropertiesFrontSurfaceLeftSurfaceMaterialReflectanceRenderLayerRightSurfaceTopSurfaceTransparency
Methods
GetTouchingParts()
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

Luau
local spawn = Instance.new("SpawnLocation")
spawn.Anchored = true
spawn.Neutral = true
spawn.Parent = workspace

Part · Team · Teams · Players