Hey I was trying to move a GUI using UDim2.
I put this command in my code to test how UDim2 works:
print(UDim2.new(UDim.new(1,0), UDim.new(0,0)))
It outputs
{0, 0}, {0, 0}
Is this supposed to happen? The Roblox Wiki says it should work.
And the Roblox Wiki is correct, it does work.
You can construct a UDim2 3 different ways.
UDim2.new()
: Creates a new UDim2, with all values set to 0.
UDim2.new(xScale, xOffset, yScale, yOffset)
: Creates a new UDim2 with the given values.
UDim2.new([UDim] xDim, [UDim] yDim)
: Creates a new UDim2 from the given UDim values.
The second constructor listed is the most commonly used method, but the third listed will work. I'm not sure how you got your results from attempting to print out the UDim2.