Rotate player to enemy from array

I think this whole chunk is doing nothing

What’s wrong with just the bottom half, without the gate? And I think it will work better on tick, rather than using the ‘turn to enemy’ event.