Getting Object distance behind player

using UnityEngine;
using System.Collections;

public class KeepDistance : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	//Restricts the position of this object to be within a distance of "distance" of "center"
    public float distance = 40;
    public Transform center;
	// Update is called once per frame
	void Update () {
		
		float dst = Vector3.Distance(center.position, transform.position);
        if (dst > distance)
        {
            Vector3 vect = center.position  - transform.position;
            vect = vect.normalized;
            vect *= (dst-distance);
            transform.position += vect;
	
	}
}
}

I need to keep the object trailing behind the player. When I have a positive number for the variable distance the object stays in front of me at the same distance. When I have a negative number for the variable distance the object blinks in front and in back of the player.

anyone?

There’s really no such thing as a negative distance, there’s a distance in another direction but this is still a positive distance.

What it seems you want to do though is compare the trailing object’s current position with the desired rear position. The desired rear position would be a point projected along the negative z axis of the target by some distance. Your follower object would then move as close as possible to THAT position.

Assuming center is the name of the Transform that the object is trying to stay near to, and distance is the minimum distance this object will follow at; the desired rear position would be:

Vector3  rearPoint  = center .position - (center .forward*distance);