How can i restrict how far you can size your object?

I’m using Handle Adornments to make a scalable part. I came across an issue where if I either pull my dragger too far then it will just keep going and it doesn’t have a limit I’ve tried combatting this but nothing works… now i have the problem of going backwards scaling and if you go too far your part will go down to 0.05 on the axis you were scaling on and start moving backwards. One last thing when I rotate the part it ends up scaling correctly but moving it backwards to combat the size changing doesnt work right image Here is my code if anyone can help… Thanks!

if Handle.Adornee then
					Distance = Distance - (Distance%Increment)
					if PreviousDistance ~= Distance then
						Handle.Adornee.Size = OriginalSize + AxisSizeMultipliers[Face] * Distance
						Handle.Adornee.CFrame = OriginalCFrame + (AxisPositioningMultipliers[Face] * Distance) / 2

						PreviousDistance = Distance
					end
				end

You can try clamping the size with math.clamp:

Part.Size = Vector3.new(
    math.clamp(x, minNnumber, maxNumber),
    math.clamp(y, minNnumber, maxNumber),
    math.clamp(z, minNnumber, maxNumber)
)

Although, I’m not too sure on how you can use this in your code. This is just an idea.

Might work I’ll have to try it later, thanks!