Use WASD or arrow keys to move.
This just shows one way you could implement player following and timed sprite animation. Feel free to use any of the code, but at lease credit with @BaLals :)