UI Slider controls

I am building a slider control for stretching legs. My problem is not in stretching the legs, the switch works fine. But I am having a problem limiting the control from left to right, from off to on. I thought it was the Limit Rotation constraint but I tried limiting the x value and it did nothing. Any advice on putting limits on a UI Slider?

Well not sure if this will work in the long run but add a limit location instead of limit rotation constraint. Seems to work so will find out later.