UGH! Im trying to make a stupid toggle switch but it NEVER WORKS. It sets it to false when the flag is clicked, and it sets it to true when you click it perfectly fine. But then when you try to switch it back to false it switches right back! IVE BEEN TRYING TO GET IT TO WORK FOR HOURS!
Heres the script:
when GridToggle clicked if <(grid) = [True]> set (grid) to false end wait 0.5 secs if <(grid) = [False]> set (grid) to true end wait 0.5 sec
Offline
Upload please
Offline
Bricklink101 wrote:
UGH! Im trying to make a stupid toggle switch but it NEVER WORKS. It sets it to false when the flag is clicked, and it sets it to true when you click it perfectly fine. But then when you try to switch it back to false it switches right back! IVE BEEN TRYING TO GET IT TO WORK FOR HOURS!
Heres the script:when [GridToggle v] clicked if <(grid) = [True]> set (grid) to [false] end wait (0.5) secs if <(grid) = [False]> set (grid) to [true] end wait (0.5) secs
Fixed.
Offline
it doesnt work because if the grid is true, it is then set to false; because it is false it is then set back to true by the second part of the script. you need this
when [GridToggle v] clicked if <(grid) = [true]> set [grid v] to [false] else set [grid v] to [true] end
Offline