Overflow platform differences for UDim offsets and VectorInt16

System Information (macOS): M1 MacBook Pro on macOS Tahoe 26.5
System Information (iOS): iPhone 13 mini on iOS 26.0
System Information (Windows): AMD Ryzen 5 5600X on Windows 10

Overflow behavior on UDim, UDim2, Vector2Int16, and Vector3Int16 is different across platforms.

Overflowing a UDim and UDim2 offset on macOS and iOS will cause the value to be clamped at it’s maximum value.
image
On Windows, the value will overflow to the int32 minimum value.
image

Overflowing a Vector2Int16 and Vector3Int16 value on macOS and iOS will cause the value to be -1.
image
On Windows, the value will be 0.
image

Script used:

--UDim2 Scale is not affected by this.
print(UDim.new(0, math.huge))
print(UDim2.new(0, math.huge, 0, math.huge))

print(Vector2int16.new(math.huge, math.huge))
print(Vector3int16.new(math.huge, math.huge, math.huge))

Expected behavior

The behavior should be consistent across platforms or provide a warning to the user that such a value will cause difference across platforms.

Thank you for the report! Will add to our backlog to investigate.

1 Like