So I know how to do this but whenever it comes to scripting it, it could be messy because I make the shadow a frame the parent of the button so I just want to know if there is a way to make this more efficient like making the button a parent of the shadow frame
You could set the ScreenGui to use ZIndexMode.Global instead of Sibling, and just make sure the actual Frame has a higher ZIndex than the shadow. This can be pretty inconvenient for other reasons though.
Why do I want to make the zindex for the shadow higher when i want it to be under
That’s the opposite of what I said
oh my bad, wat does this mean ScreenGui to use ZIndexMode.Global instead of Sibling
With Sibling, which is the default mode, ZIndex only changes the order things are rendered in within a single parent, i.e. between the different children of a single parent. With Global, any object with higher ZIndex will show on top of any object with lower ZIndex, regardless of which parent they have.