ZIndex issue with my GUI's

I’ve got 1 existing GUI. And then I create another GUI in script. But this new GUI displays underneath the existing GUI. I changed the ZIndex of the one created in script to (2) while the default one is (1)

But no such luck. Any ideas?

How do you have the GUIs structured in explorer?

Basically the one that is existing, is a GUI with 1 frame inside the startergui

And then I create another GUI in code and add a frame and then parent it to the player gui

Can you please send it as an image? If you are creating it via code, run it in studio, then take a screenshot of explorer (while it is still running)

Meant how it is in explorer, not the viewport!
Make sure you have everything expanded in Explorer

https://gyazo.com/87482a5cfccd2a164ea8de2bcddb3145

And then the other is created via code

Seed = Instance.new('ScreenGui', game.Players.LocalPlayer.PlayerGui)

Frame = Instance.new('Frame', Seed)

Frame.ZIndex = 3
Frame.Active = true

Frame.Draggable = true

Frame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)

Frame.BorderColor3 = Color3.fromRGB(255, 255, 255)

Frame.AnchorPoint = Vector2.new(0.5, 0.5)

Frame.Position = UDim2.new(0.5, 0, 0.5, 0)

Frame.Size = UDim2.new(0, 175,0, 195)

Frame.Name = "Main"

Odd.

Can’t hurt to try setting the ZIndex via the script to like 999 or something high, see if that fixes it


(can also try what is recommended in the response below) ↓

try changing ScreenGui.DisplayValue if its two different ScreenGuis

1 Like

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