I can't cap the UI slider at 0.5 while the max value is 1

So a I am making a basic stat system where I have several sliders for the stats. This allows me to add points with the slider. So basically I want to be capped at 5 points that I can be added while the maximum when leveling up is 10. Now, I made a float which tells me the remaining points I have and set the max value of that to 5 and the min value to 0. I made a check to see if the remaining is equal to 0 and if it is, I’d want the slider to stop moving. This can be done by setting the step size to 0, but that disables me from eventually adjusting the points of that stat back to e.g 3 instead of 5. Any solution to this?