How do I set the value to GUI offset?
if script.Parent[""..number.Value].Position.X.Offset > 40 then
script.Parent[""..number.Value].Position.X.Offset = 40 ---It wont let me do this
end
I cant use UDIM2.new because that involves Y axis variables, but this system works on more then one frame with different Y positions. And I can't use + UDIM2.new because it's not always the exact same value over 40 every time.

2 comments
That actually sets x.scale to 0 therefore changing the Y Offset, scale and the X scale.
I don't understand what you mean. All four of the components of a UDim2 are independant of each other, and that code should only set X.Scale to 0 if it was 0 when the code was run.