var exp : Rigidbody;
var Speed : float;
var Turn : float;
function Start () {
transform.Translate(2, -130, 0);
Destroy (gameObject, 20);
}
function Update () {
var targets : GameObject[] - GameObject.FindGameObjectsWithTag("enemy");
var closest : GameObject;
var closestDist - Mathf.Infinity;
for (enemy in targets) {
var dist - (transform.position - Target.transform.position).sqrMagnitude;
if(dist < closestDist) {
closestDist - dist;
closest - Target;
}
}
transform.rotation-Quaternion.Slerp(Transform.Rotation,Quaternion.LookRotation(closest.transform.position-transform.postion),Turn*Time.deltaTime);
transform.postition+-transform.forward*Speed*Time.deltaTime;
}
says i need semicolon and it already there!