stuck in height

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 

but its say error in Unity, How can i fix it? thanks

Is this the complete script?

You need to define ‘target’. It is probably meant to be a transform variable, exposed in the Inspector, where you can put any object from your hierarchy/project.

var target : Transform;

Edit: Now that you edited your post to contain the whole script:

target.TransformPoint needs a Vector3 input (or three numbers, separated by commas). I am not sure what exactly the script is supposed to do, so I couldn’t say what vector should be in there, but the argument list it gets now is (int, Vector3, Vector3). It might be that you only want one component of the two vectors (for example (0, tinggi.y, -distance.z)), but that is only a guess.

Would be very helpful to post the error, especially as it will tell you which line is throwing the error!