AI speed based on distance to the player?

I’m currently working on a zombie AI for a project. They move to the player closest to their position. The closer they are to the player, the faster they move, until they are face to face, in which the zombie would just stop. I currently have the zombie moving towards the closest player. I have checks for certain distances to change speed, and then I use MoveToActor. However, the zombie is always moving at max walk speed, and he doesn’t change the direction he’s facing to actually walk forward. I get that I’m not actually changing his velocity, I’m just not sure how to go about it. I feel like if I set his velocity with the players direction, the zombie will just always face the player, even when rounding corners or something. And changing max walk speed just sounds janky. If that’s the best way though, let me know. All of this is in my AI Controller. This is my first time using Unreal so please bare with me. Any help is greatly appreciated. Thanks!

So I fixed the facing issue. I guess ‘Use Controller Rotation Yaw’ needs to be checked under pawn settings.

I got it working by changing max walk speed. Still, let me know if there’s a better way.