Oh, you mean a checkbox. The problem with your events is that they both run at the same time! The first event runs, which makes the second event true, so it runs afterwards and sets it back to the original state. You need to use a third state and specifically ordered events, like so:
+ Mouse clicked
+ Value is 1
: Set value to 2
+ Mouse clicked
+ Value is 0
: Set value to 1
+ Value is 2
: Set value to 0