ZIndexBehavior is a new property on LayerCollector objects (ScreenGui, BillboardGui, SurfaceGui) that changes the way the ZIndex property behaves for all GuiObjects contained inside. For now, it has two options:
Default: The previous behavior before this change, where objects were sorted first by ZIndex, then secondly by their hierarchy ordering.
Sibling: A new behavior, which we hope will be more intuitive and useful to developers. In this scheme, objects are sorted first by their (depth first) hierarchy ordering and secondly by their ZIndex. This means that settings the ZIndex only rearranges how GuiObjects render relative to their siblings. You also don’t need to recursively apply ZIndex anymore. If the parent has a ZIndex of 10, the children do not need to be updated to 10 in order to still render on top.
What do you think the default should be when inserting a new object through Studio? (This would not apply to serialization or Instance.new because of backwards compatibility.)
Sibling should be the default absolutely as this is the more common use case and will be easier for beginners. (And nobody panic, changing the inserted studio default doesn’t change your already-created guis)
This brought me back to the time when I first cracked open GUI objects and I thought this was how ZIndex worked initially. Good change. Also thanks to Clone for the picture - it’s worth a thousand words.