# Sandbox.SpriteInstance.Play

```csharp
void Play(string animation, bool restart = False)
```

Selects an animation by name and resumes playback. Playing the selected animation
preserves its position unless restart is true. An unknown name leaves playback unchanged.

### Parameters

- `animation` (`string`)
- `restart` (`bool`), default `False`

Declared in [Sandbox.SpriteInstance](/api/Sandbox.SpriteInstance).
Assembly: `Sandbox.Engine`.
