When sizing a part, it goes to 0.001 when sizing all the way down. Very inconvenient, how should I go about detecting this?
Code:
HandleScale.MouseDrag:Connect(function(id,distance)
local delta = distance - MousePrev
local delta2 = math.abs(delta)
if delta2 > 1 then
local sizD = math.round(delta)
local canCollide = HandleScale.Adornee.CanCollide
HandleScale.Adornee.CanCollide = false
if HandleScale.Adornee:Resize(id,sizD) then
MousePrev = distance
end
HandleScale.Adornee.CanCollide = canCollide
end
Well, it resizes based on the face so how do I get the size of the side of the face to see if the side of the faces size - new face size is lower than incremental and if it is to not size it
The size of the side of the face would be either the X, Y or Z of the part’s size. You can check if the current side’s size - incremental >= 0.001 to make sure that you are able to lower the size by the incremental. 0.001 is the smallest the part can go which is why it is stuck at 0.001. if you want it to go to zero I suppose you can check if current side’s size - incremental < 0.001 then set transparency to 1.
Oh, I see what you mean now. You can check if the current side’s size - incremental >= incremental and if so, allow it to change, if not, then set the side’s size to the incremental.