Skip to content

SpawnLocation

SpawnLocation is a part-like prefab marked as a possible character spawn point. The exact scripting component name is SpawnPoint, not SpawnLocation.

local location = game.Prefabs.Spawn("SpawnLocation")

if location ~= nil then
    location.Parent = self
    print(location.SpawnPoint) -- true when the tag is present
end

Spawn is server-only and returns a detached root. The built-in PlayerSpawner searches with game.World.Each("SpawnPoint") when choosing a spawn location.