Home / World

world.spawn()

world.spawn()

Returns the coordinates of the world's spawn point.

Parameters

None.

Returns

Three numbers: x, y, and z.

Example

command('spawn', function(sender)
  if sender.isPlayer then
    local sx, sy, sz = world.spawn()
    sender:teleport(sx, sy, sz)
  end
  return true
end)