Error pressing left and right keys at the same time

I was testing my game and I realized that when I press the left or right key and then the opposite key, the player stops moving but the walking animation continues, is there any way to fix this?

You will need to work through your game logic to account for that use case. If you just want them to not move, you need to treat “both left and right pressed at hte same time” as if the player was pressing NO directions.

If you want them to move in the last direction they were pressing, you’ll need to build out logic to account for that, usually involving a variable. You can see one way of doing this method in the Finite State Machine within Not-A-Vania included in the engine examples list.