The Ui Passes over its parent

i seem to cant solve this but the ui is passing over1585141265.59612063 its parent

here is the image above

my code:

local bar = script.Parent



	
while wait() do
		

    for i, v in pairs(game.Players:GetPlayers()) do
	
		local lb = v:WaitForChild("leaderstats")
		local levels = lb:WaitForChild("Level")
	    local exp = levels:WaitForChild("XP")
		script.Parent:TweenSize(UDim2.new((exp.Value/tostring(30 * (levels.Value + 1))), 0,1,0), "Out", "Quint", 0.3, true)
	end
end
1 Like

While using those Roblox stat thing |I do not know what it is called to show your game stats your game UI can never be ontop of it. Which means the Zindex is high.

2 Likes

Zindex is only 1 and the bar is passing through everything to the edge of the screen

What Parent are you talking about? Are you trying to make it go on top of the Roblox built-in UI? Your question is a bit unclear, but UI should always display on top of its parent by default (unless you mess with ZIndex). If it’s not displaying over its parent that has higher ZIdex, make sure you set ZIndexBehavior to Global, rather than sibling.

7 Likes

You can’t overlap that. It’s scripted by Roblox for nothing to go over it.

2 Likes

What if you tried toggling the ZIndexBehavior of the ScreenGui.

Not clear what you’re asking here. If you want your Gui to render over that stats Gui, you won’t be able to: developer Guis are not allowed to render over CoreGuis for security purposes. Changing the ZIndex will have no effect on that. If it’s related to the bar, then you can just use ClipsDescendants and/or correct the calculation of the bar size.

1 Like