Checkboxes show the value of a variable that is either 0 or 1 through using a check in a box, and when you click it, it changes the variable. Sliders, on the other hand, will store a variable between two values and when you click the slider it modifies the variable to fit the position of the slider.
The biggest difference is that if I change the variable the slider or checkbox represents through external code, the checkbox will change but the slider won't. I think this is because the variable of the slider is stored in the GUI and for the checkbox, it's not. How do I get around this?