Please help me make GameObject FlipY when RotationZ is less than -90. I know something is wrong with my script I just need to help to fix it.

if (gameObject.transform.rotation.z < -90)
{
weaponRenderer.flipY = true;
Debug.Log(“FLIP”);
}

        if (gameObject.transform.rotation.z > -90)
        {
            weaponRenderer.flipY = false;
        }

the console message is not being shown too.

Change your if conditions like
If (gameobject.transform.rotation <= -90)