when i make a clone of enemy it uses original enemy position. i need a work around. either a way to get a clones position or someone can tell me im dumb and show me a better way to do this thank
CloneEnemy.transform.position = new Vector2(10, 10);
Thanks I can’t test this now but won’t this just change the position of the spawned clone or am I wrong?
yes, isnt that what you want?
if you just want the position just call it
No the problem lies with the way I make the enemy follow the player it uses the original enemy’s position not the clones position do you know how I could call the clones position instead
CloneEnemy.transform.position thats how u call it
keep getting this error msg any idea on how to fix UnassignedReferenceException: The variable CloneEnemy of EnemyAttack has not been assigned. You probably need to assign the CloneEnemy variable of the EnemyAttack script in the inspector. EnemyAttack.Update () (at Assets/Scripts/EnemyAttack.cs:22)
can u show code of that line?
Where gameobject.find(“enemy”)is switched with CloneEnemy