Movement Done (sort of)

I have the basic movement for the player, but there is a problem that can be seen in the video. Any Ideas how to fix it? Code.PNG

https://youtu.be/nEbXEzFZAVw