I'm learning how to script a gui that a frame increases as the exp/health/cash goes up?
✓ ANSWER ACCEPTED
What does The UDim 1, and UDim2 do?
1 answer
✓ Accepted answer
UDim2 is a data type that allows you to manipulate GUI sizes and positions. You can use it like this:
GUI.Size = UDim2.new(XScale,XOffset,YScale,YOffset)
Scale
The scale values can be used to make an auto resizing GUI. For example if you had a frame that was 300x300 pixels you and inside that frame you had an image that was set to the size of
UDim2. new(1,0,1,0)
You could increase the frame to 400x400 pixels and the image would follow.
Offset
Offset is measured in pixels. This will be the same on every screen resolution. Having a frame the same size may cause it to be larger on smaller screen resolutions compared to bigger screen resolutions.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
UDim1 does not exist in Lua. That would be like accessing a 1-Dimensional object. An example of this would be a single line. It has no depth, or width, just length. In order to see it, you would need width or depth. Therefore, it isn't in RBX.Lua because it would be pointless to include it, as it could not be used.