Hey all. I want to constantly keep a GUI's Y Position to 0,0. I tried this script but this error popped up:
Y cannot be assigned to
I understand that there's UDim and UDim2, but in this case UDim2 wouldn't be helpful.
script.Parent.Changed:connect(function(p)
script.Parent.Position.Y = UDim.new(0,0)
end)
Thanks in advance!

2 comments
Thanks. Now I have another problem. I flipped the brackets and replaced X with Y. The GUI's position is 0,0,0.5,0. When I run and drag the GUI, its position is always 0,0,0,0. Why?
The UDim2 constructor takes four parameters, not only two: UDim2.new(xScale, xOffset, yScale, yOffset).