Consider the following:
Screenshot of GUI element in a ScrollingFrame
Screenshot of the same GUI element’s Explorer hierarchy
Now, imagine that when this element appears/disappears on the screen, you will want to fade the main Frame object along with all of its descendants in/out respectively.
Now imagine that you have a dozen plus of these elements on screen, and you want to fade them all in at once. Currently, the only reasonable way to achieve this is to use :GetDescendants() and tween the BackgroundTransparency, ImageTransparency, TextTransparency, and TextStrokeTransparency for each applicable object. This can get very clunky very quickly, and cause a plethora of highly unnecessary TweenService calls for each individual object.
So I’m curious, why can’t we just have a property that acts as an additive modifier to all of the descendants’ transparency properties? This honestly just seems like an oversight that has long since been left behind on the idea board.
My suggestion is to create a new float property to be inherited by all GuiObject classes called BaseTransparency. By default, it acts as an additive modifier for all transparency properties in the object’s descendants. For example:
1) Frame A has a BaseTransparency of 0.5
2) Frame B (child of Frame A) has a BackgroundTransparency of 0.2
3) Acting as an additive modifier, Frame A’s BaseTransparency value is added to Frame B’s BackgroundTransparency value, which equals 0.7
4) Frame B now has a BackgroundTransparency of 0.7
If you’re feeling frisky, add another property called BaseTransparencyType (I’m not good at naming) that allows the developer to specify whether or not BaseTransparency acts as an additive or multiplicative modifier.
Feel free to leave your thoughts.