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

true. Btw he does not have to do it every tick, every one sec should work too