Backpack not disabling

I’ve used this simple line of code in a local script, located in StarterPlayerScripts:

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

It doesn’t seem to work, I’ve put it in StarterGui, StarterCharacterScripts and it doesn’t seem to work either way

when I insert the script into another game, it works

Is there an error in the output? Because that might be the reason it’s not working.

nope, no errors or anything. Sorry if I didn’t answer like 5 days later

Are there any scripts in your game also interacting with the backpack? Thats the only possible reason this isn’t working. Also have you tried putting this in a loop?

Yes, I’m trying to make it sort of like Arsenal’s invisible hotbar. Yes I’ve tried to put it in a loop

Probably this script would work:

StarterGui = game:GetService("StarterGui")
repeat StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
until StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

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