I have other scripts in the same project using boolean if statements that work fine, but I've tried multiple methods of testing if the if statements below are working and none of them worked!
I don't really know what to ask because I don't know whats going on. I've tried placing theae statements in Update and Start, and in both instances the if statement completely ignored the check and just executed the contents of the block as though the check evaluated to true.
void OnTriggerEnter(Collider other) {
if(other.gameObject.CompareTag("Player")); {
working = true;
}
Extremity = false;
if(Extremity); {
Instantiate(Cannon, transform.position, transform.rotation);
Extremity = !true;
}
}
The false statement is only in there to show that even when the bool is set to false immediately before the check, it still runs the Instantiate method inside as though it were true.