> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionsync.md).

# npc.motionsync

```lua
npc.motionsync()
```

|                         |                                                                         |
| ----------------------- | ----------------------------------------------------------------------- |
| id                      | `0x00A6`                                                                |
| arguments               | 0                                                                       |
| in NPC Kit              | yes                                                                     |
| measured from a kit NPC | returns                                                                 |
| waits                   | it has a wait handler: it can hold the script, and in `talk` the player |
| vanilla scripts         | 1599 calls in 225 of 1114 scripts                                       |

## What it does

Holds the script until the NPC's current motion has played out. [motionsync\_282](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionsync_282.md) with `0`.

## Timing

Waits until the motion ends; a skipped cutscene ends it.

## In NPC Kit

A kit NPC's probe returns from it; on a standard gesture it is not tested in the game. `motionsync_282(1)`, which also lets go when the NPC stands ready, is the safer form.

## Used with

* [stdmotionplay\_2c2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionplay_2c2.md), [motionsync\_282](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/motionsync_282.md).

## Example

A gesture that must end before the next line: the beat waits for it.

```lua
shrug = function()
    npc.stdmotionplay_2c2(0x01000015, 20);   -- no
    npc.motionsync_282(1);                   -- safer than motionsync() on a kit NPC
    npc.stdmotionplay_2c2(0x01000002, 20);
end,
```
