- Edited
I'm learning how to code with Godot, and in the tutorial im following the creator decided to not add a crouching option - which, i decided to do by myself to learn more.
However, for the life of me I can't figure out how to make the character stop moving when they are crouching. I've looked all over the internet and still can't find anything.
Here's my line of code for crouching if it helps
if Input.is_action_pressed("ui_down") and is_on_floor():
anim.play("Crouch")
Please help!!
EDIT: I finally figured it out! thanks for the help.
Here's how my code looks if anyone is having the same problem! (keep in mind this code also includes the code for the animations :p)