How do you plug AI running animation in?

I looked on YouTube to see how to make a AI follow you, and the tutorial said to basically copy your character pawn and remove all the controls and camera, and add the simple so AI code sense player cast to the name of the character, and move to the pawn which is self.

So it works but my AI is sliding towards me, how do I give it a running animation, because in on the video he just copy and code and the animation works.