Pointing a child at an object using its parents rotation

Hi I have a system where an object’s child has to face a target I require the entire object to be rotated so the child is facing the target but cant seam to work out the correct quaternion combination. I currently have this which seams to work fine except in some odd circumstances.

	transform.rotation = Quaternion.RotateTowards(transform.rotation,
			                   transform.rotation * Quaternion.FromToRotation(
                                                    ,temprotspeed * Time.deltaTime);

I know I basically need to apply a rotation that is zero when the child is facing the object but cant seam to work it out…and im sure its something rather easy…

Any help would be appreciated

how about using this Function instead :

var relativePos = target.position - transform.position;
var rotation = Quaternion.LookRotation(relativePos);
transform.rotation = rotation;