Why don't objects resize with my frame?

So, I have this UI design where when you click a button it resizes the main frame of my UI. I want the frame to cover the other objects inside of it so that it can resize to {0, 0} {0, 0}. How would I do this?

Code

Recording

2 Likes

From the video it seems as if the objects in the frame are sized using pixels instead of relative scale to the parent frame. Are you trying to make the button in the top right scale accordingly to the animated frame? If so try switching from something like {0, 100}{0, 100} to {0.5, 0}{0.5, 0}.

2 Likes

^^
Same us above, judging by the results I believe the button is in Offsets rather than scale - just make sure all the Offset values are zero.

1 Like

What do you mean by this? I do not understand.

In {0, 100}{0, 100} there is a 100-pixel size offset, which means the button will only be 100 pixels in width/height no matter what size the parent frame is. This means that if your frame is the size {0, 50}{0, 75} the button will be larger than the frame itself.

Here’s a visual example:
The blue frame is {0, 960}{0, 540} which corresponds to half of the screen’s size in each axis. The red frame is {0.5, 0}{0.5, 0}.


If we double the screen size, notice how the blue frame is half the original size and the red frame stays the same size. This is because the first value in {0.5, 0} makes the frame 0.5 times the size of the screen/parent frame.

only starting to realize how large this explanation is (lol), but I hope this makes it easier to understand.