Need help spawning prefabs

Hello, I am making an endless FPS game where you protect an object from an endless stream of enemies. I have almost all code done, but I can’t seem to make the enemies spawn(from prefabs) with all code. The bits which I have screenshotted and attached have to be applied manually. How could I alter the code, or make it so the prefabs already have this on them?
I’m a beginner to Unity and C#.
I have the screenshot below, let me know if you need a screenshot of my code!

6515352--734541--help prpper.PNG

Do they not stay assigned if you assign them and then update the prefab? If your prefab already exist, you can open the prefab and assign everything and it should save. If you are doing it through the hierarchy, then make sure you apply the changes to the prefab.

Well, it stayed assigned after I reassigned it, but the enemy only goes to where the player was, and if they move, they don’t follow. The bit that needs to be re-applied is the player bit.