Zindex behaving weird

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to fix my zindex gui problem

  2. What is the issue? Include screenshots / videos if possible!
    So basically i have 2 screen guis and the one screen gui has a textlabel in it with the zindex of 9 and in the other screen gui it has a frame with the zindex of 1 and when i enable both screenguis the frame (with a zindex of 1) goes overtop of the textlabel (with a zindex of 9) Idk if this is because they are 2 different screen guis but idk how to fix it

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I have tried YT and Devforum.

Yea it is. ZIndex doesn’t really matter here, what does is the LayoutOrder of the ScreenGuis. The one with a higher LayoutOrder will overlap the other

1 Like

Ok, thanks, lemme try this and let you know if it worked

Btw, how do i change layout order (im not on my pc rn, so i can’t check)

It is called a display order. It resides within the ScreenGui’s properties.

The higher the DisplayOrder the higher the ScreenGui will be put.
image


Same goes for ZIndex, but ZIndex is for objects inside the ScreenGui itself.

With ZIndex, you can have the ScreenGui’s ZIndex behavior be either Global or Sibling
In the images bellow:
Both hierarchies are the same, meaning we only changed the ScreenGui’s ZIndexBehavior property

Hierarchy:
image

Results with both ZIndex behaviors
(it may depend on which frame’s ZIndex was first changed btw)

2 Likes

Thanks! It worked, your a lifesaver, i never knew about that, now i do :smiley: + 1 UI Knowledge

Here’s another random fact:
You can put UIPadding inside of a TextLabel and it will behave like so:

1 Like

OHH, that actually also something i didnt know, thanks man!

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