> 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/motioncancel.md).

# npc.motioncancel

```lua
npc.motioncancel()
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0149`                          |
| arguments               | 0                                 |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 4040 calls in 350 of 1114 scripts |

## What it does

Stops the NPC's motion where it is.

## Timing

Returns at once.

## In NPC Kit

Works on a kit NPC. To go back to standing, play the idle instead: `npc.stdmotionplay_2c2(0x01000000, 20)`.

## Used with

* [stdmotionplay\_2c2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionplay_2c2.md): the next motion to play.

## Example

A gesture cut short when the talk starts, the NPC brought back to standing.

```lua
local startled = [[
Oh! I didn't see you standing there, traveler.
You gave me quite a fright, sneaking up like that.
]]

talk = function()
    npc.motioncancel();                       -- stops the laugh it was playing in main
    npc.stdmotionplay_2c2(0x01000000, 20);    -- the idle, blended
    talkOpen();
    npc.lua(function(handle) say(handle, startled) end);
    talkClose();
end,
```

## Pitfalls

* After `motioncancel` alone the NPC holds the frame it stopped on: play a motion after it.
