LocalRotation not working

i have an gameobject inside another one… when i try to apply a localrotation to it, it freaks out.
if (Input.GetKeyDown(“a”)){ transform.localScale.z = -0.105055;transform.localPosition.x = -0.2;transform.Rotation.x = -55.0 ;}

	 if (Input.GetKeyDown("d")){ transform.localScale.z= 0.105055; transform.localPosition.x = 0.17;transform.Rotation.x = 55;} 

the transformRotation.x=55 and the -55 one both do not work … it just goes in a random direction … HELP!

transform.rotation and .localRotation are 4D quaternions, the x/y/z axes don’t correspond to what you see in the inspector (plus there’s a w axis). You’d want eulerAngles, but set them all at once, not just one axis.