#How to make one gui ontop of all others

1 messages · Page 1 of 1 (latest)

tropic crystal
#

Trying to make a transition to shop gui but the shop gui appears in front of my transition square.

versed spoke
#

ui.Zindex = otherui.Zindex + 1

#

thats most simple way

#

or you can just remember what all their Zindexs are

tropic crystal
versed spoke
#

i can make one for you

#

this would be for a singular screen gui, if you have mutiple you can edit it

#
local function PlaceOntop(screengui : ScreenGui,WhattoPlaceonTop : Frame)
    local screenguichildren = screengui:GetChildren()
    
    for i = 1,#screenguichildren do
        if screenguichildren[i] == WhattoPlaceonTop then
            screenguichildren[i].ZIndex = 5
        else
            print("Maybe Dont need to change ZIndex but we can be careful")
            screenguichildren[i].ZIndex = 1
        end
    
    end
    
end
PlaceOntop(YourScreenGuiInstanceHere,YourFrameInstanceHere)



#

this is a better line 2 local screenguichildren = screengui:GetDescendants()