I Need Help Programming A.I For A Game I'm Working On

Yes thats fine, but you have to update your script with the script above again.

oh sorry i did not notice the change…

I see everything is working now except the lookAt function.
I think this is not working with a dynamic rigidbody.
Maybe try to set the rigidbody of the neightbor on kinametic.

I see you change it back to:


try also this again:


You can also see the console, by clicking on the dots in the top right corner of your browser, and look for More Tools. Then click on Developer Tools.