Help please!!

Hello!
i have a follow script:


#pragma strict

var target : Transform; //the enemy’s target
var moveSpeed = 10; //move speed
var rotationSpeed = 3; //speed of turning

var myTransform : Transform; //current transform data of this enemy

function Awake()
{
myTransform = transform; //cache transform data for easy access/preformance
}

function Start()
{
target = GameObject.FindWithTag(“enemy”).transform; //target the player

}

function Update () {
target = GameObject.FindWithTag(“enemy”).transform; //target the player
//rotate to look at the player
myTransform.rotation = Quaternion.Slerp(myTransform.rotation,
Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);

//move towards the player
myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

}

My allies are follow my enemy, but if i haven’t got another enemy, they follow me… how i can fix this problem? Help plz!

This seems to be a script to make the enemy move towards the player (or another target). Not sure if you’re using this for both enemies and allies, but you probably shouldn’t.

What do you want your allies to do, in stead of following you?

Why is your player tagged “Enemy”?