Need Help with Initializing AIPerception and getting enemy to switch players on the fly.

You could hold on to the pointer to the actor that you get in the UpdatedActors array and then update the target in OnTick. Or you could use a UPawnSensingComponent that is a kind of “simpler” version of the AIPerceptionComponent and has it’s own update interval, and do the stuff there.