Mostly solved. I just need to make an on / off button. :-\
0 to 1 and back to 0 each time the button is pressed. I tried [if (var1 = 0) var1 = 1;] and vice versa but nothing happened.
You don't need a variable, just use
GuiName.Visible = !GuiName.Visible;
To switch a variable from 0 to 1 and back, use
var1 = 1 - var1;
The reason why this didn't work for you depends on where you put that code and where you defined the variable (and the code that actually switches the GUI's visibility).
And also you should have written if (var1 == 0) and not if (var1 = 0).
Quote from: tzachs on Tue 05/10/2010 14:45:49
And also you should have written if (var1 == 0) and not if (var1 = 0).
I actually did use two ==, but thanks. Anyway, Khris your code worked perfectly! That's a brain teaser equation! And a lot simpler than and if/then statement. 8)
Thanks! ;D