# CyberM.animations — client runtime

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

5 functions.

## current

```lua
CyberM.animations.current(entity)
```

`GAME` — Requires a live game instance.

The clip a body is currently playing.

Returns false when it is playing nothing — which is a state, not an error.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `entity` | `entity` | required | — |

Returns: `clip name, or false`, `reason, when applicable`

Registered in `ResourceHost.cpp` (line 6591) as `LuaAnimationCurrent`.

## play

```lua
CyberM.animations.play(entity, animation)
```

`GAME` — Requires a live game instance.

Plays a named animation on a body.

Does not work on the local player: their body cannot hold a workspot. Use `CyberM.animations.playSelf` for that, which stands a double in for them.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `entity` | `entity` | required | — |
| `animation` | `string` | required | — |

Returns: `true on success, otherwise false`, `reason for the refusal`

```lua
local ok, reason = CyberM.animations.play(entityId, "emote_smoke")
if not ok then print("refused: " .. reason) end
```

Registered in `ResourceHost.cpp` (line 6587) as `LuaAnimationPlay`.

## playSelf

```lua
CyberM.animations.playSelf(animation, [thirdPerson])
```

`GAME` — Requires a live game instance.

Plays an emote on the local player, through a stand-in body.

The player's own body cannot hold a workspot, so an invisible double takes their place for the length of the clip. This is a separate call rather than `play` with the player's id because the mechanism is genuinely different.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `animation` | `string` | required | — |
| `thirdPerson` | `boolean` | optional | — |

Returns: `true on success, otherwise false`, `reason for the refusal`

Registered in `ResourceHost.cpp` (line 6588) as `LuaSelfEmotePlay`.

## stop

```lua
CyberM.animations.stop(entity)
```

`GAME` — Requires a live game instance.

Stops whatever a body is playing and releases what was set up for it.

Stops the workspot animation currently managed by CyberM for the selected body and releases its native animation state. It does not claim or stop arbitrary game animations that CyberM does not own.

| Parameter | Type | Required | Default |
|---|---|---|---|
| `entity` | `entity` | required | — |

Returns: `true on success, otherwise false`, `reason for the refusal`

Registered in `ResourceHost.cpp` (line 6590) as `LuaAnimationStop`.

## stopSelf

```lua
CyberM.animations.stopSelf()
```

`GAME` — Requires a live game instance.

Stops the local player's emote and removes the stand-in.

Ends the local-player emote created by `playSelf` and removes its stand-in body. Cleanup is idempotent and is also performed when the owning resource generation stops.

Returns: `true on success, otherwise false`, `reason for the refusal`

Registered in `ResourceHost.cpp` (line 6589) as `LuaSelfEmoteStop`.

