You can but there is not point and it’s a waste, because Mouse.X and Mouse.Y are offset from the screen resolution and you want it to follow the mouse no matter the screen resolution.
I’m pretty sure (not 100% sure) what you want is the UI size to be scale, that way it’s the same size on a bigger or smaller screen resolution.
I am making a UI library and every object that I create in the UI library uses Scale not offset so this would break that. The size of the Frame is not what I am focused on it is the Dragger not working using scale
run.RenderStepped:Connect(function()
UI.Position = UDim2.new(0,Mouse.X,0,Mouse.Y) -- this way it'll drag properly no matter the resolution and no matter the parent
end
-- when the player "places" it parent it and convert it to scale
Changing the anchor point will mess up the Frame creator in my Library as the normal anchor point is 0, 0 so it will mess up the positioning and the equal gap that I have put in
So what you want to do, is have the mouse in the center of the UI with the UI anchor point at 0,0. For that you would have to apply offset
run.RenderStepped:Connect(function()
UI.Position = UDim2.new(0,Mouse.X - (UI.Size.X.Offset / 2), Mouse.Y - (UI.Size.Y.Offset / 2)
-- if you don't have UI.Size in offset you'll have to convert it
-- p.s. not 100% sure if this will work but I think it will, may as well try
end)
you are able to change the properties after you create them though? Plus you aren’t changing it from scale to offset you are just getting the offset so you can use it to position it properly