Anchoring a GUI instance based on another GUI

  1. What do you want to achieve?

I want to be able keep a GUI at a certain position based on other GUI’s position.

  1. What is the issue?

I cannot find the tools/path to make this possible.

  1. What solutions have you tried so far?

One thing I tried is to make the GUI a descendant of that other GUI and setting the position to be the anchor point of that GUI. However, I would need to create a script to constantly change the size based on the user’s screen which takes up resource to do so.

How I want it to be:


How it is now:

You could try using a UIListLayout on the parent object. This moves the children in order of off their current size along one axis but still scales them accordingly. Here is an example I made below.



Above are 3 images of the same ui on different window sizes, the reason I used a scale offset of -10 is because the space between the two objects has a padding of 10 pixels (property can be found in the uilistlayout object) without it, the obj would go to the end of it’s parents frame.

Below is what it looks like in the explorer. (My icons might look a bit different because im using a theme but it would end up with the same result for you)

image

Hope this helps!

Thanks for your input, and sorry for the late reply! The left block is actually scaled based on the y-axis. I tried to look into the listlayout object, but I’m not getting the result right now.

Could you send a place file of the gui so I can look into it?