private Transform rightUpperArm;
Quaternion rightUpperArmLocalRotation = rightUpperArm.localRotation; // Where do you set rightUpperArm? It will be null here.
rightUpperArm.localRotation = Quaternion.Lerp( rightUpperArmLocalRotation, rightUpperArm.localRotation, transition ); // Whats 'transition' ?
The code seems a bit strange, you are lerping from and to using the same angle. Nothing will happen.