how to safe player rotation

-ask-
how to save the data, for example, my player hit a cube with xyz rotation, i want to save it into a variable.
this is for position
data.Ycordinat=transform.position.y;

var saveRotation : Quaternion;

function OnEnterTrigger(hit : collider){

   saveRotation = gameObject.transform.localRotation;

}