Why does setting the size axis of a part to a negative value change it automatically to 0.05?

I noticed when I’m trying to convert one of the positive size values to negative, it immediately changes to 0.05 no matter the prior value. What is the reason behind this? If it changes to 0.05 no matter the value, then what is the purpose of setting the size value to negative in this open-sourced script?

local HeightIncrement = IceShard.Size.Y/2 -- This Y value is 10
IceShard.Size = Vector3.new(SizeX,SizeY,SizeZ)
IceShard.CFrame = HumanoidRootPart.CFrame * CFrame.new(Side,-HeightIncrement,Value + Extra)*
CFrame.fromEulerAnglesXYZ(URO,Rotate,0.4)
IceShard.Parent = Folder

Specifically regarding the height increment, why divide the Y axis by 2 then set it to negative when setting the new cframe? Why bother dividing it by 2 anyway if it’s going to be 0.05 when set to negative.

0.05 is the minimum size in any dimension for any physical instance, whether it be a BasePart, mesh, or other. I’d guess it has to do with physics due to the limitations of computers on low-level arithmetic, there’s a finite range of numbers for which you can have accurate results. It also follows that you can’t set negative size values, and that would be problematic for many math operations anyways, since size should be assumed to be a physically possible dimension in a single given direction (not just any vector pointing anywhere).


If you want to make the part behave as if the size was negative (i.e. that size vector is reversed), then you’d basically have to mirror the part on the plane normal to that axis and set the size on that axis to the absolute of the negative size dimension. Mirroring could get pretty complicated, but whenever I have these geometric problems I just bring out a paper and pencil and solve it the old school way, and then implement it into the script.