# Replay: step() method

> The step() method of the Replay interface shows the next tick, with its events and messages.

The **`step()`** method of the [`Replay`](/docs/client/replay) interface shows the next tick, with its events and recorded messages.

## Syntax

```ts
step()
```

### Parameters

None.

### Return value

A boolean: `true` if it showed a tick, and `false` if the replay was already at its last tick.

### Exceptions

None.

## Description

`step()` fires a [`message` event](/docs/client/replay/message-event) for each broadcast recorded in the next tick, applies the tick's changes and fires the entity and presence callbacks, then fires the [`tick` event](/docs/client/replay/tick-event). A step that reaches the last tick stops playback and fires the [`ended` event](/docs/client/replay/ended-event).

## Examples

### Stepping frame by frame

A replay viewer steps one tick with the period key while paused, to study a close call.

```ts
// frame-step.ts
import type { Replay } from "@irtio/client/replay";

export function bindFrameStep(replay: Replay): void {
  addEventListener("keydown", (e) => {
    if (e.key !== "." || replay.playing) return;
    if (!replay.step()) console.log("that was the last tick");
  });
}
```

## See also

- [`Replay.seek()`](/docs/client/replay/seek)
- [`Replay.play()`](/docs/client/replay/play)
