So I was scripting some UI in my obby earlier today and I wanted to make it so that when a image button was hovered over the size would become bigger/smaller really haven’t decided yet. So I did a basic script using MouseEnter.
Then thinking ahead I did the same script but with MouseLeave and this time I made it so that when the mouse left the button size would go to small again, note this script is a child of the button.
Then I tested the game and I realized that the button’s background was too big and even the slightest mouse movement could trigger the tween. So I thought of a workaround and entered an empty text button with a transparent background and tweaked the scripts so that now the tweens would b triggered by the textbutton instead of the general button, but here is the thing, when tweaking I just tweaked the line where the game would identify what entered and left does what and even though now the tweens were affected by the textbutton they affected only the imagebutton.
Then I tested the game, for the most part it seemed to be working fine but when I entered and left with my mouse button simultaneously and quickly it just sometimes froze and then resumed tweening after I entered and left slowly again.
I thought this was weird so I opened a baseplate and just quickly ran the same script on a textbutton though note this textbutton did not have a child that triggered the tweening, then I tested the baseplate and weirdly enough it was tweening perfectly fine even when I was entering and leaving at the speed of light.
So my question is pretty self explanatory, does having a child trigger the tween affect the functionality of the tween? (If this turns out to be a bug, well then just tell me xD) very confused right now should this be happening?
Can you provide some screenshots and code examples to help make a little more sense what you are trying to do?
Changing the size of a BaseGUI will not always change the size of it’s descendants. It depends whether the descendants are using the Scale or Offset properties of Size.
It’s wrong to automatically assume he us using Scale, different people make UIs different ways. I personally have made many UIs that are all Offset and some that are all Scale. It really depends on the situation, so it would be good to understand what he is doing before trying to solve it (possibly incorrectly).
Lol ok so after about 30 minutes of dissecting about 300 lines of code and slamming my head into the wall for about 10 minutes I have found the issue and I have fixed it thank you everyone who tried to help.