Getting the enemy to attack the hero when spawned

This is Game Dev 3: Final Project…

When the enemies spawn from the generator, instead of the enemies attacking the hero, the hero is attacking the enemies and is not responding to my controls.

Please help me, thanks

Welcome to the forum @PV2020! :partying_face: This is a friendly place where you can ask help on levels, report bugs, or just chat with other coders! Don’t forget to read the guidelines if you haven’t yet. Have a great time!

Can you please post all of your code and formatted using this button: