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

# npc.fadesync

```lua
npc.fadesync()
```

|                         |                                                                         |
| ----------------------- | ----------------------------------------------------------------------- |
| id                      | `0x00B9`                                                                |
| 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         | 6412 calls in 801 of 1114 scripts                                       |

## What it does

Holds the script until the screen fade of [fadeout](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadeout.md) and [fadein](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadein.md) has ended. It waits on that fade only (layer 0); fades the game starts on its other layers are not waited for.

## Timing

Waits, once a frame, while the fade runs.

## In NPC Kit

Right after each `fadeout` and `fadein`, as vanilla (6,412 calls).

## Used with

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

## Example

```lua
npc.fadeout(15);
npc.fadesync();        -- the screen is black from here
npc.setpos2(29.36, -9.0, 68.65);
npc.wait(3);
npc.fadein(15);
npc.fadesync();        -- the screen is back from here
```

## Pitfalls

* Without it the calls after a `fadeout` run while the screen is still fading: the player sees the NPC jump.
