Zindex is not respected when there are multiple ScreenGui

Reproduction Steps

1) Create a ScreenGui and inside it a Frame with Zindex 99
2) Create a second ScreenGui and inside it a Frame with Zindex 1

Expected Behavior

Zindex should behave as if both Frames are inside the same ScreenGui

Actual Behavior

When frames (or any other Gui object) are in different ScreenGuis, Zindex is not respected:


Issue Area: Engine
Issue Type: Display
Impact: High
Frequency: Constantly

This is working as intended. ZIndex only controls order within the same ScreenGui, and there is a separate DisplayOrder property on ScreenGui that can be used to control which one renders on top.

Real situation: I have a temporary ScreenGui for a preload screen inside ReplicatedFirst.
This screen will be shown until all elements of the official ScreenGui are loaded and then it’s destryoed.
However, the official ScreenGui elements are appearing “over” the loading screen.
The solution would be Zindex.
But this doesn’t work.

Try setting the DisplayOrder of the loading screen gui to a higher number and it should appear over top of the rest of your UI.

9 Likes

It worked.
I didn’t pay attention to this property before.
Every day learning something new about Roblox…
Thank you very much.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.