Ive tried setting the zindex by scripting as well as using the explorer, but it is not working. Here is the script I used: game.StarterGui.ScreenGui.Barsoutline.ZIndex=101 -- bars outline is an image label game.StarterGui.ScreenGui.Barsoutline.ImageLabel.ZIndex=23
COMMUNITY QUESTION
the zindex for a gui is 101 and the other is 23 and the one with 23 is overlaying?
1 answer
When the game initializes, all the contents of StarterGui go to the PlayerGui which in the explorer is located under game.Players.playerName.PlayerGui if this is a local script, you can use this to access the PlayerGui: game.Players.LocalPlayer.PlayerGui. So emplementing that into your script:
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
playerGui.ScreenGui.Barsoutline.ZIndex = 101
playerGui.ScreenGui.Barsoutline.ImageLabel.ZIndex = 23
Hope this fixed your problem!
2 comments
0
It should also be noted that you should get the service rather than call it directly, as that is good practice + the fact that not all services load instantly on game load. Do game:GetService("Players") in one line, and call LocalPlayer in the next.
0
Using :GetService() ruins intellisense lol
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
is clip descendants on?