I also wanted to add to duncan’s answer that you should also implement cone of vision for the enemies. Something like this