Problem with prefab

Hey guys,
I have a problem with my enemy prefab that is instantiated in my Game sometimes:
it is assigned to the player prefab because it’s supposed to follow the player, however it goes to the prefab position of the player and not the actual ingame player that is moving in the game.
Does someone know how to fix this?

Please try to be more specific with you question so we can better help you with your issue.

I am guessing that you are instantiating an enemy and you want that enemy to have its ‘target’ set to the player gameObject. To do this you will need to find the player when instantiating it with something like this (if doing this remember to set the ‘tag’ of the player to ‘Player’):

private Transform target;

-----

target = GameObject.FindWithTag("Player").transform;