Debug states its true but if doesnt trigger.

Debug.Log(this.transform.localEulerAngles+" | "+weaponButtons.camEuler);
if(this.transform.localEulerAngles == weaponButtons.camEuler){
Debug.Log(“Check”);
var weaponV4 : Vector4 = profileScript.ModWeapon(selectedWeaponType, “Return”, 0);
Debug.Log(weaponV4);
weaponButtons.damageText.text = "Damage "+weaponV4.x;
weaponButtons.rangeText.text = "Range "+weaponV4.y;
weaponButtons.clipSizeText.text = "Clip Size "+weaponV4.z;
weaponButtons.reloadRateText.text = "Reload Rate "+weaponV4.w;
}

this is running in the Update on a camera

The Debug shows that my local euler is 0, 180, 0 and that the weaponButtons.camEuler is 0, 180, 0.

the if statement is not running…
the “Check” debug is not running…

How can i fix this?

transform.localEulerAngles (and, I assume, your weaponButtons.camEuler variable) are vectors of floating point variables, and it’s never a good idea to check for equality of floating point numbers.

Instead, check whether the difference between the components is less than a certain acceptable margin of error, or perhaps compare the dot product of the two vectors to see whether it’s sufficiently close to 1.