Convert Offset Sizing to Scale Sizing - Plugin to keep your UI sizing the same on all screen sizes

I was just making a dialogue box and I realized, “hey, there should be a plugin to convert offset to scale.” So I just made that…

If you have no idea what this means, it basically allows your UI to size by a percentage of the screen, rather than an amount of pixels. This is absolutely great to do, and it’s strange that Roblox UI doesn’t do this by default.

With this button, making your UI compatible with all screen sizes is just one click away. Here’s a video of the plugin in action:

How it’s made:

This plugin is extremely simple. Here are the steps:

  1. Get the viewport size
  2. Loop through each selected object
  3. The most important part, divide offsetX / viewportX to get a decimal that you can use as a scale value (repeat step for Y)
  4. Set the size to the scale values.

Try it out yourself: Convert Offset Sizing to Scale Sizing - Roblox

Thanks for reading!

5 Likes

There is already a plugin like this which has this feature but lots other ones as well. What is different/why would we choose this plugin over the below which is quite a popular and trusted one?

2 Likes

Thats the exact same question im thinking, plus, isnt autoscale easier to use? U just have to press a button

So if I use it, its gotta be simple

2 Likes

Sorry, didn’t know about that plugin! Also just found a known bug.

Is this a reason to move this to creations feedback?

No it should be fine in #resources:community-resources cuz it is classified as a resource to be used for the community.

1 Like

Some people might want standalone features rather than downloading a full suite.

1 Like

Oh ok, I thought of changing it because it’s not really contributing anything apparently.

BUG FIX(ES):

  • Previously, trying to convert a GUI object inside of another GUI object (in my case, an imagelabel in a frame), it would squish it weird. That is now FIXED.

  • After fixing the above bug, another one appeared: trying to convert a GUI object inside of another GUI object that had scale instead of offset would cause the math to be infinite scaling (number divided by 0) and cause the GUI object to simply disappear. That is now FIXED.

literally that’s exactly my plugin

My plugin is the same exact simplicity, but possibly even simpler. My thing you just click the button in the plugins tab.

I really am curious as to why you said that even though the post says

and the video literally shows that you press a single button and it converts the selected frame(s).

Fine, if you want me to answer, here I am

I might have made a mistake, sorry about that

I like your plugin

1 Like

Oh, thanks! You don’t have to like it, I was just curious.

Hmm… LOTS of other ones, huh?

Yeah one extra is very different. Anyway, would it make it better if I made an automated version for free? Like it auto-does this as soon as you add in a GUI element? “Oh but that guy made that.” Mine can be free.

You can look at the code if you want.

Could be a cool feature to add inside of the PlugIn.

1 Like

Alright cool, i’ll get started on that later (probably) (and if it works, which the chances are slim but i’ll try.)