Can't disable backpack

Hi, I am making a new game but I need to disable the backpack for it.

I have a LocalScript in StarterPlayerScripts

-- Disable backpack
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
print(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))

I have ACS 2.0.1 installed.

1 Like

put a wait statement before you disable the backpack with SetCoreGuiEnabled
this should fix it

StarterGui is not a Service. Use the following instead:

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

does not fix it‍‍‍‍‍‍

do a loop until it has been disabled, ig sometimes it doesn’t set

is the script even enabled though?

Pretty sure ACS forces the backpack to be enabled. It does this with other things too which makes the system a pain to work with

also that is incorrect, it is a service

I think that is right but you need to get rid of print then it will work.

Local script in StarterGui:

local StarterGUI = game:GetService("StarterGui")

wait()

StarterGUI:SetCoreGuiEnabled("Backpack", false)

Hope this works for ya :slight_smile:

1 Like

A local script that will destroy a players backpack:

wait(0.2)
local player = game.Players.LocalPlayer
local cloned = script.Parent.TheScriptsName:Clone()
cloned.Parent = player.Backpack
local cloned = script.Parent.TheScriptsName:Destroy()
script.Parent.Destroy

Assuming it’s placed as a child to starter gui

Thanks a lot, that worked perfectly :+1:

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