Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

When should you use scale and when should you use offset?

Asked by 10 years ago

I am always confused with this. I know what the two are. The problem is when I make my UI, it looks good on my monitor, but when I test it with friends, they say it doesn't look right. A wiki article or some assistance would be much appreciated. Thank you all in advance!

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

The distinction really only matter up to the first 'depth' that uses only Offset for the Size of the GUI. Everything parented to those GUIs will look identical on all monitors. The Position can use Scale, so long as the Size does not.

Now, getting to that point:

If you have a GUI Panel that you want the same size on all monitors, use Offset to determine its Size. It's Position, as stated, can be set using Scale, and the GUI itself will look the same on all monitors.

If you have a GUI you want to cover some portion of the screen, for instance a side-bar graphic, use Scale.

Keep in mind that Offsets can be negative:

Frame.Size = UDim2.new(0, 50, 0, 50)
Frame.Position = UDim2.new(.5, -25, .5, -25)
--This Frame will be a 50 by 50 pixel box on *all* monitors. As well, it will be in the exact center of all monitors.
Ad

Answer this question