Multiple AI characters has problems colliding with actors

This gave me different results each time I played.
One crashed because of an infinite loop,
one got too many and by that I mean they got 2+ instead of 1+ collected apple values
and lastly one was the same as it was before.

This is how the code looks like right now:

I couldnt add overlap checker for the sphere since it wouldnt let me play because of an infinite loop