SpawnLocation
SpawnLocation : FormFactorPart
Overview
A SpawnLocation is an Object that defines where a player's character will appear in the game.
When a player joins the game or their character dies during gameplay, the character respawns at the location specified by the SpawnLocation
Properties
Enabled
bool
Sets whether the SpawnLocation is active.
If a SpawnLocation is disabled, characters will not spawn there. If no active SpawnLocation exists in the game, the character will spawn at the coordinates (0, 0, 0).
Code Samples
local SpawnLocation = script.Parent
SpawnLocation.Enabled = falseNeutral
bool
Sets whether the SpawnLocation is team-neutral.
When this property is set to true, any player can spawn at this location regardless of their team.
If set to false, only players whose team color (Player.TeamColor) exactly matches the spawn location's team color (SpawnLocation.TeamColor) will spawn there.
Code Samples
local SpawnLocation = script.Parent
SpawnLocation.Neutral = trueTeamColor
BrickColor
Sets the team color to indicate which team this SpawnLocation belongs to.
Code Samples
local SpawnLocation = script.Parent
SpawnLocation.TeamColor = BrickColor.new("Lime green")Methods
Events
Last updated