How to transfer rotation from child to parent object?

It seems like it should be easy to transfer rotation from child object to parent of that child object, but nothing i try seems to work.

One of many things i tryed were: vector3 x = child.forward; parent.forward=x; child.forward = vector3.forward;

Anyone can help? I hate getting stuck on something that should be totaly simply. Thanks in advance.

Do you need to do it constantly or as an active thing?

This is just more of a rough idea than the actual script as it depends on what you want it for but how about this

public Transform theParent;
public Transform theChild;
public Vector3 NewPos;

void Start () {
	NewPos = theChild.localEulerAngles;
	theChild.localEulerAngles = new Vector3(0,0,0);
	theParent.localEulerAngles = NewPos;
}

}

Would something like that be okay?

Edit: Updated to Rotation and tested it, works for me