I've heard of UIScale but its description on the Wiki is very vague. It doesn't say it will convert offsets to scale.
Would anyone know of a module/library that does something like this? How would you convert position to scale?
child.Position = UDim2.new(child.AbsolutePosition.X/child.Parent.AbsolutePosition.X,0, child.AbsolutePosition.Y/child.Parent.AbsolutePosition.Y,0)
Is pretty wrong for what I'm trying to do. If I do it that way, it will not scale position properly for some reason.
Any module(s), etc?
You can try absolute position divided by the screen resolution, if that's what you mean.
Would this work?
function OffsetToScale(gui) local mouse = game.Players.LocalPlayer:GetMouse() local x,y = mouse.ViewSizeX,mouse.ViewSizeY gui.Position = UDim2.new(gui.AbsolutePositionX/x,0,gui.AbsolutePositionY/y,0) end OffsetToScale(frame)
I have a line of code that can convert any position to scale
--For X positionx / camera.ViewportSize.X --For Y positiony / (camera.ViewportSize.Y - 36)
For Y you would have to subtract it by roblox's top bar height else it will be wrong.