Why use SpawnLocation?
SpawnLocation is a special BasePart used by Roblox character spawning. Its Neutral and TeamColor settings help determine eligible players; layout and obstruction still matter.
Try it in Roblox Studio
Put this Script in ServerScriptService and test player respawns in Studio. Position the spawn in a safe open area.
Syntax
spawn.Neutral = trueExamples
SpawnLocation
Create a neutral spawn pad.
local spawn = Instance.new("SpawnLocation")
spawn.Name = "PracticeSpawn"
spawn.Size = Vector3.new(8, 1, 8)
spawn.Position = Vector3.new(0, 2, 0)
spawn.Anchored = true
spawn.Neutral = true
spawn.Parent = workspace- The SpawnLocation is placed in Workspace like a physical part.
- Neutral = true makes it eligible regardless of a player’s team.
- If several eligible spawn pads exist, this example does not guarantee the next spawn uses this exact pad.
Best practices
- Leave clear space above a spawn pad.
- Test team and neutral spawn rules with multiple players.
Runtime & versions
Luau host; Roblox engine examples require Roblox Studio. Feature availability depends on the language and runtime version used by your project; consult the official reference below.
Luau documentation