# setPedAnimationProgress (Client)

> Jumps an animation the ped is playing to a point in it. Without `anim`, it stops the `setPedAnimation` animation.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Animations
- **URL**: https://wiki.mymp.gg/en/setPedAnimationProgress

## Syntax

```lua
bool setPedAnimationProgress(element ped [, string anim = nil, float progress = 0])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `ped` | `element` | The ped or player. An element with peds below it in the tree applies to all of them. |
| `anim` | `string` | The animation's name, as given to `setPedAnimation`. *(default: `nil`)* |
| `progress` | `float` | The point, from 0 (start) to 1 (end). *(default: `0`)* |

## Returns

`true` if it was changed on the element given. `false` if it does not play that animation, is not a ped or is streamed out.

## Example

```lua
setPedAnimation(localPlayer, "DANCING", "dance_loop")
setPedAnimationProgress(localPlayer, "dance_loop", 0.5)
```

## See also

- [getPedAnimationProgress (Client)](https://wiki.mymp.gg/en/getPedAnimationProgress.md): Tells how far along the animation the ped is playing is, such as one from setPedAnimation.
- [setPedAnimation (Client)](https://wiki.mymp.gg/en/setPedAnimation.md): Makes a ped play an animation from a block, or stops the animation it is playing. The animation applies on this client only.
- [setPedAnimationSpeed (Client)](https://wiki.mymp.gg/en/setPedAnimationSpeed.md): Changes the speed of an animation the ped is playing.
