How to set the speed of a state to 2?

I just want to set the speed of a state to 2 and this code doesn’t work :confused: How can I do that?
this.entity.anim.layers[0]._controller._states.Walk._speed = 2;

Technically, you can’t at runtime. It’s part of the graph static data.

You would have to change the anim component speed value: AnimComponent | PlayCanvas API Reference

Thanks. I think I can solve this problem by creating a new state.