Character run and jump animation problems

I am trying to set animations for running and jumping, but the problem is when I jump, if I start running again while in air, it stops the jump animation and does the run animation while still in the air… and if I jump but keep the W key held down, it just slides along without the running animation even after I’ve landed. It’s because I have it set up to do the animation when a key is pushed, but I’m wondering what better way there is so the animations will show correctly. I’ve looked for tutorials but I’m having a hard time finding anything good.

You should look at the third person animation blueprint which comes with the engine.