Coregui isn't disabling?

I’m trying to disable the backpack coregui because I want to use my own hotbar/backpack/inventory and it isn’t disabling. Instead it decides to overlap my custom inventory/backpack.

(problem) = I can’t disable the backpack coregui.

(It’s inside StarterGui)

My Script for disabling the coregui:

local StarterGui = game:GetService("StarterGui")

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

Make sure this is in a LocalScript, the LocalScript is not disabled (disabled property), and the script has access to the LocalPlayer (StarterPlayerScripts, StarterCharacterScripts, etc.)

It’s a local script, not disabled, and has access to the LocalPlayer etc. It’s still not working would you have any better code because I tried all the ways I know to try and disable it and it won’t disable.

I am still learning coding so it could be a problem in my code.

Try printing something inside the script to see if it runs


I’ve just copy and pasted your exact script into my game and it works without an issue
LocalScript inside StarterGui, the Enabled property is true

try this:

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

Isn’t that the exact same thing as doing game:GetService(“StarterGui”)?
The only difference should be that GetService will work regardless of StarterGui’s name

nope, because this is the correct way.

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

What isn’t correct about using GetService though

It’s not working for me at all and it’s still popping up the default backpack could it be a script in my game that’s causing this?

loop until its disabled

local StarterGui = game:GetService("StarterGui")

repeat task.wait(1)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
until not StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
1 Like

Maybe if another script is doing the exact same thing you’re doing, but setting the Backpack to true instead of false. Is it erroring at all in the output?

No there are no errors from what it shows me in the output

try this:

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

There could be another script setting the visibility to true. Try someone like what @BirdieI90 sent, it will continuously set the visibility of your backpack to false until it works.

You have posted this 3 times now and I’m telling you that using :GetService will not make a difference. It’s the exact same thing, but :GetService will work regardless of StarterGui’s name

Would I just copy and paste the exact code into the same script? or would I need to change it to somewhere in StarterPlayer

Hello??? Did you see my solution?

1 Like

Yes (copy paste it) (character limit weofgbuwoigw)

1 Like