How to make AI follow the closest character in a multiplayer?

Get all player, get distance of 2 points (player location, ai location), find the smallest value, call FollowActor and set that player as the actor to follow