Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

What is UDim2.new used for?

Asked by 10 years ago

What is UDim2.new used for and what does it mean?

2 answers

Log in to vote
5
Answered by
emite1000 335 Moderation Voter
10 years ago

UDim2.new is used for creating a new UDim2 (similar to how Vector3.new creates a new Vector3).

UDim2 is a data type ROBLOX added for positioning GUIs (just as Vector3 was added to position things such as blocks). UDim's have an Offset and a Scale, and UDim2's have an X offset and Scale and a Y Offset and Scale (hence the name UDm2, since it is made up of 2 UDims).

If you want to learn how to actually use UDims for creating a GUI, there are many tutorials available on different websites. Here's a link to one ROBLOX wiki tutorial: http://wiki.roblox.com/index.php/Beginner%27s_GUI_Tutorial

Ad
Log in to vote
-4
Answered by 10 years ago

UDim2 is used for GUI positioning/size.

Answer this question