What did I do wrong here?

Hello, I don’t do animations often and was attempting to do a crouching animation. As you can see at the bottom when i push my keybind for crouching it does a repeating animation and I don’t see what happened here.

https://gyazo.com/0bdc0dc962cb5632db5dfbe58bcc4a8e

Could you please provide the code?

1 Like

pov: no script provided when asking for an answer

https://gyazo.com/e05a36867d40bd77920ae29188d628df

what is inside your animation editor? do you have any other script running an animation when the player presses c?

When the player presses c the animation plays so once it finishes it plays again until the key is called to stop it, I think this is why

No, when C is pushed that is the only animation running

Everytime the animation ends it restarts that’s why it looks like he is going down again

Since the first key frame of your crouching animation is presumably in a standing position, when the animation restarts it will start by matching that key frame forcing the character to stand again.

To fix it you will need to make an animation where all key frames are in a crouched position. That way when it loops it will still be targeting a crouched position.

To animate between standing and crouching you’ll either have to adjust the animation transition time, or create a crouch animation that plays before the idle animation starts looping. Though depending on style this step might not be necessary.

1 Like

Use UserInputService.

It would help if you provided your code