i set the zindex of the button to 5 and the image label to 0, but still the imagelabel is overlaying it
i set the zindex of the button to 5 and the image label to 0, but still the imagelabel is overlaying it
I believe that the ZIndex is overriden when a gui object is inside of another
In the documentation it states exactly this.
This means ZIndex only applies to the children of the gui object, not the parent.
Edit: The person under me explained it way better, in order to fix it you should folow them.
You’re almost there, it’s dependent on the ZIndexBehavior
, look at your ScreenGUI a property called ZIndexBehavior
should be under it. It should be set to either sibling or global. In this case the ZIndex behavior is probably set to Sibling
, change it to Global
.
This is because the ZIndex is overridden by the parent when the ZIndexBehavior is set to Sibling.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.