Click on player works whereas click on enemy doesn't

I can get it to work if I put the code inside the AI controller, but that means they all react at once, unless you incorporate a check to see where the mouse click was…