hi, i found this script in google
var target : Transform;
var distanceToFollow : float = 5.0;
var height : float = 1.0;
var moveSpeed : float = 1.0;
var rotationSpeed : float = 1.0;
private var targetRay : Ray;
function FixedUpdate () {
//move the camera into position behind the target
targetRay = new Ray(target.position,-target.forward);
tinggi = targetRay.GetPoint(height);
distance = targetRay.GetPoint(distanceToFollow);
wantedPosition = target.TransformPoint(0, tinggi, -distance);
wantedPosition = Vector3.Slerp(transform.position, wantedPosition, Time.deltaTime * moveSpeed);
transform.position = wantedPosition;
//rotate the camera to match the rotation of the target
transform.LookAt(target,target.up);
}
but its say error in Unity, How can i fix it? thanks