How would you approach an AI that follows different players? (Multiplayer Listening Server)

Hello, so I’m trying to prototype an AI that will follow any player in a multiplayer setting (Listening servers)? I’ve tried to use GetAllActorsOfClass in combination with AI move to but it has only returned faulty results.

I’d do/make an array that stores the player index’s (if you don’t know arrays watch a tutorial on them they’re great), then get a rand integer between the array min and max, then use that for the get player character, then do what you’d normally do for a following task. I haven’t actually worked with that but I think that could work. You’d have to make sure that it doesn’t loop except when you want it to, probably with decorators, so if you have any idea how you want to do the event in which it switches players tell me