Enemy AI shoot, and follow player in range

hi I’m rather new to unity and looking to create a script that will make the enemy chase the player and shoot at them with raycasts when in range but cant seem to find anything that works online any suggestions?

Hello.

You are asking for a full script. Unity answers is not for this…

IF you pretend to achieve that. Go step By step

You need all this:

learn to use Raycasts

learn to make an object look at other object

learn to make some simple AI decision scrtipt

Once you know how to use all of this, try make some scripts, try try try, and if dont siceedm, come here again and make a post asking for ONLY ONE function to work. Step by Step.

this is nnos a Scripts Service provider.

Post Closed, Bye.

Good luck!