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

# npc.modeldispose

```lua
npc.modeldispose(model)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x00C1`                          |
| arguments               | 1: Int                            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 1319 calls in 152 of 1114 scripts |

## What it does

Releases a model the script loaded, once no actor holds it.

## Arguments

### `model` (Int)

The model key; vanilla passes entries of the map's model list (`0x03000000 + n`).

## Timing

Returns at once.

## In NPC Kit

Not needed: the game releases a kit NPC's model with the map.

## Used with

* [modelread](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/modelread.md), [charcachedispose](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/charcachedispose.md).

## Example

Nothing to call in the kit: the NPC's model goes with the map. To change the model mid-game, bind another one:

```lua
transform = function()
    npc.bindp2_d4(0x006E002B, 4, 3);   -- Dalmascan Soldier replaces the old model
    npc.stdmotionread(16);
    npc.stdmotionreadsync();
    npc.stdmotionplay_2c2(0x01000000, 0);
end,
```
