i got this code off YouTube for a basic enemyAI and the only error im getting is at (4,26) saying : is unexpected, so what is expected. by the way im running te free version of unity.
public class FollowBotAI : MonoBehaviour
{
Transform; Leader;
float; AISpeed = 10;
float; MaxDistance = 10;
float; MinDistance = 2;
void Start(){
Leader = GameObject.FindGameObjectWithTag("Player").transform;
}
void Update(){
Transform.LookAt(Leader);
AI();
}
void AI(){
if(Vector3.distance(Transform.position, Leader.position) >= MinDistance)
{
Transform.position += Transform.forward*AISpeed*Time.deltatime;
if (Vector3.Distance(Transform.position, Leader.position) >= MaxDistance)
{
AIDie();
}
}
}
void AIDie(){
Destroy(GameObject);
}
}