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

# npc.fadein

```lua
npc.fadein(frames)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x00B8`                          |
| arguments               | 1: Int                            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 4621 calls in 712 of 1114 scripts |

## What it does

Fades the screen back in from black over a number of frames. [fadesync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadesync.md) waits for it. It runs on the same fade as [fadeout](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadeout.md), so it brings back what that one covered.

## Arguments

### `frames` (Int)

How long. Vanilla: `fadesystemtime()` (1,212 calls, the system's default), `1`, `15`, `0`, `10`.

## Timing

Returns at once; the fade runs over the frames.

## In NPC Kit

After a [fadeout](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadeout.md) in a scene's `open` or `close`. A `wait(3)` before it lets a camera cut take effect first, so the first frame seen is the new shot.

## Used with

* [fadeout](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadeout.md), [fadesync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fadesync.md), [camerastart\_7e](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/camerastart_7e.md).

## Example

The way back from the black in a scene's `open`: the shot cut, three frames for it to take, then the fade in.

```lua
open = function()
    npc.fadeout(15);
    npc.fadesync();
    npc.camerastart_7e(0, npc.camera("npckit_0021"));
    npc.wait(3);
    npc.fadein(15);
    npc.fadesync();
end,
```

## Pitfalls

* With no `wait(3)` after a cut the first frame seen can still be the old camera.
