UDim2||doc135369

September 20, 2022

UDim2

Udin2 is a coordinate used to build the user interface. It represents the absolute size and relative size of the X and Y dimensions. It consists of two dimensionsUDimData type combination. The most common use of udim is to set the position of the UI window.

Constructor

UDim2 UDim2.new( UDim x,  UDim y  )
Create a udim2 type data instance
UDim2 UDim2.new( float relativeX,  float pixelX,  float relativeY, float pixelY)
Create a udim2 type data instance
UDim2 UDim2.new( UDim2 udim2 )
Create a udim2 type data instance

Properties

UDim UDim2[1]
Relative and absolute information of x-axis
UDim UDim2[2]
Relative and absolute information of y-axis

computation

UDim2 UDim2 + UDim2
Returns the UDim2 after adding the two UDim2 values
UDim2 UDim2 – UDim2
Returns the UDim2 after subtracting the two UDim2 values