I’ve been using the following code to try and disable the backpack, however it hasn’t been working. The code is in a localscript, in StarterCharacterScripts, does anyone know how to fix this? local a,b = pcall(function() game:GetService('StarterGui'):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) end)
I have tried without the pcall, and no error is produced, and the ode before and after it still runs.
I put this exact code into a LocalScript under StarterCharacterScripts and didn’t change a single thing. It functioned just as expected, the backpack was disabled. Are you sure you’re actually experiencing an issue in which you’re unable to disable the backpack?
-- Some alternative code - point is to print the results of the pcall
local StarterGui = game:GetService("StarterGui")
local success, result = pcall(StarterGui.SetCoreGuiEnabled, StarterGui, Enum.CoreGuiType.Backpack, false)
print(success, result)
I’ve tried this exact code and it works fine, are you sure your using it as a local script? I suggest utilizing the console it’d give you some type of error if your somehow not doing this correctly.
How does it not work as expected? Please provide some extra details such as a screenshot of the current behaviour, your codebase and its hierarchy, and what you expect the outcome to be.