UDim2

A size or position on both axes, each a UDim.

Blend two with Lerp, or read each axis.

Constructors

Up and coming: the native runtime gives these. Today a program reads a UDim2 from an attribute, and shot check refuses UDim2.new in a System project.

NameArgumentsReturnsDescription
UDim2.new(xScale: number?, xOffset: number?, yScale: number?, yOffset: number?)UDim2
UDim2.fromScale(xScale: number?, yScale: number?)UDim2
UDim2.fromOffset(xOffset: number?, yOffset: number?)UDim2

Properties

NameTypeDefaultDescription
HeightUDim
WidthUDim
XUDim
YUDim

Methods

NameArgumentsReturnsDescription
Lerp(goal: UDim2, alpha: number)UDim2

Operators