Help with slider gui, min 80 and max 120

I’m trying to make a slider but not how to set the min and max as in doing the min being 80% and max being 120%, so instead of 0% and 120%, I want 80% and 120%

here’s a example

the slider starts at 100% and the min is 80% and the max is 120%

How could I get the same results?

here’s my code

	while userInputService:IsMouseButtonPressed('MouseButton1') do
		
		local mouseLocation = userInputService:GetMouseLocation()
		local offset = math.floor((mouseLocation.X - bodyDepthScaleBg.AbsolutePosition.X) / snap + 0.5) * snap
		local offsetClamp = math.clamp(offset, 0, bodyDepthScaleBg.AbsoluteSize.X)
		
		local roundedAbsSize = math.floor(bodyDepthScaleBg.AbsoluteSize.X / snap + 0.5) * snap
		local roundedOffsetClamp = math.floor(offsetClamp / snap + 0.5) * snap
		
		local percent = roundedOffsetClamp / roundedAbsSize
		
		bodyDepthScalePercent.Text = (percent * 120)..'%'
		bodyDepthScaleButton.Position = UDim2.new(0, offsetClamp, bodyDepthScaleButton.Position.Y.Scale, 0)
		task.wait()
		
	end

and heres what it mine like so far, the min is 0% and starts at 50% and max is 120% but its not what I want

actually nvm, someone wants to give me the answer after I just made a post. -_-

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.