Strange Rotation Behavior

I have this code:

function Go ()
{
    if (time > 1)
    {
        transform.rotation.x = 45;
    }

    move = speed * Time.deltaTime;
    transform.Translate(0, 0, move, Space.Self);
}

But the strange thing is, after a quick second the 'x' in the rotation just flies over to 0. Does anyone know why?

transform.rotation uses quaternions. It's highly unlikely you want to mess with those. Instead use transform.eulerAngles, although it's not advisable to set only one component of transform.eulerAngles at a time, and instead you should set the entire Vector3.