So I have this walking script that when I press A it does a animation and walks to the left and same thing for the D, but if I press both of them at the same time it does the animation but doesnt move, is there a way to make the player walk to the direction that was pressed last?
example: press A and it goes left and when pressed D also and it goes to the right
like in pokemon