entity:moveTo
Also: player:moveTo, entity:teleport, player:teleport
entity:moveTo(pos: Position, rotation: number?)
Moves the entity right away, without checking speed or walls.
The player's client receives a correction and cannot refuse it. Zones are evaluated in the same tick: onExit and onEnter are called before anything is sent.
Parameters#
- pos (
Position): destination, within 30,000 m on each axis - rotation (
number, optional): degrees, 0 by default
Example#
player:teleport({ 6, 8, 4.05 })
player:moveTo(vector.create(0, 0, 0), 90)