Am I missing something obvious? Here is my code:
local hidGoal = {} hidGoal.Position = UDim2.new({0.65, 0},{-0.2, 0}) print(hidGoal.Position) print("Printed hidgoal position")
Output:
{0, 0}, {0, 0} Printed hidgoal position
Why does this allow me to set a UDim2 position, but only as {0, 0}, {0, 0}? I cannot make sense of it.
When using UDim2.new
or really any .new
you do not include anything but numbers and commas. Since you have curly brackets in the parameters its likely confusing the numbers for string values. To fix this write it exactly as you have just remove the curly brackets.
Ex.
UDim2.new(0.65, 0, -0.2, 0)
UDim2.new is just usually presented with curly brackets to make what each parameter is clearer.