Skip to content
Untitled Sandbox - Developer Documentation
docs/types/Movement

Movement

An NPC's walk toward a target, which you get back from Npc:move_to so you can wait for it or cancel it.

Movement:wait

method

Pauses the script until the walk ends, and says whether the NPC arrived, got blocked or was cancelled.

Movement:wait() -> "arrived" | "blocked" | "cancelled"
example
local result = movement:wait()

Use it forletting a guide finish walking before it starts talking.

Movement:cancel

method

Stops the NPC's walk before it gets there.

Movement:cancel() -> ()
example
movement:cancel()

Use it forstopping a guard's patrol when a player gets close.

↑ ↓ moveEnter openEsc close