Use the slider to control the lamp switch

I want to use the slider to change the light switch, the slider moves to a certain position lights turn, move to another position lights off

If it’s a UMG slider we’re talking about, you can override its onValueChanged:

You may want to work in another an additional bool, and only turn the light on when it’s off and vice versa. The example above will work fine, though.