Player instance clone to load transform from prefab

I use code to generate a clone of the prefab player. I have a “bad guy” on the stage that will follow his transform using navmesh.

I made a game object drop on the badguy and I loaded the prefab but when i create it, it does not load the clones transform. No errors just simply doesnt follow the transform because its not loading the clones transform.

I just don’t know how to reference a clone’s transform without the player prefab on stage originally which I dont want to do.

I fixed it, what i did was add a empty game object on stage and through the character spawning code told it to grab that target that is on screen and attach it to the clone. Giving the bad guy a transform and keeping my character off screen!

code:

gameObject.Find("Target").GetComponent(Transform).transform.parent = transform;