Hello there! I am trying to make a GUI increase its size from 80x80 pixels to 100x100 pixels when it’s hovered over. However, when tweening its size, it expands in the bottom-right direction.
I want it to expand in all directions equally. Is there a way to do this? This is the gui tweening:
Im going to guess that its because your anchorpoint on the UI isnt in the middle, make sure its:
{0.5, 0.5} or in the middle of the plus. You can learn find out a little more about the anchorpoint here:
Normally you’re also supposed to tween the position but with the advent of AnchorPoint (as mentioned above), you’re better off senting a center AnchorPoint. This way, the position will remain centered at the AnchorPoint and the size will tween outwards or in.
If you were to change Frame/Size , you would notice that the Frame will expand to the right and downward. The very center of the frame would also not be at the exact center of the parent object. However, if you were to set the AnchorPoint to (0.5, 0.5) , the Frame would expand in all directions and the center of the frame would indeed be at the parent object’s center.