Enemy behavior is not working after the enemy has spawned.

Hi

When I spawn my enemies using Instantiate function, they work as “normal”. They are attacking, but not me. They are attacking the point where my player spawned. I do not have any GameObject that is there (that is related to the player). They work as usual otherways. I setted the Prefab up, and everything in it could work. And the original enemy works normal (if that is helpful for any reason). How can I fix this?

It's going to be hard to fix without more information about the way you're doing your AI, but I can guess : When the enemy spawn, does he get a reference to Transform of player, or just a Vector3 ? Because the second one won't be updated over time.

[Edit after reading your comment] You are confusing your player's prefab, which is a file on your computer, and it's instantiation, (is that a word ?) which is some memory space depending on the scene, based on that prefab file. So when you move your player, the prefab remain the same. Conclusion, you must reference the instantiated player, not the prefab one.