GameObject follow Tagged Object

Hi,

So I currently have an object that stays in front of a tagged object based on the following code:

target = GameObject.FindWithTag("Player").transform;
transform.parent = target.transform;
transform.localPosition = Vector3(0, 1, 2);

The problem is that I don’t want the object to become a child of the tagged object. I’m not sure how to do this, I’ve tested a few methods, but to no avail.

var objectToFollow : Transform;

transform.position.x = objectToFollow.position.x;
transform.position.y = objectToFollow.position.y+1;
transform.position.z = objectToFollow.position.z+2;

but this will be a very harsh follow, you could smoothen that out with mathf.lerp