game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
i used this to hide/disable the default backpack. I am making my own inventory and when you click the gui for equipping it equips it onto the character. the tools work if the backpack is not hidden.
Would this mean i would have to manipulate the code in the actual tool so it would know when the tool is equipped (true or false boolean) and then if its equipped then whenever i click the screen it would perform whatever the tool does?
Thank you for reading, I want to ask this question to know if there's a more efficient method in doing this.
You can manually equip a tool like this:
local Player = game.Players.LocalPlayer local Character = Player.Character function EquipTool(toolname) for _, v in pairs(Player.Backpack:GetChildren()) do if v:IsA('Tool') and (v.Name == toolname) then DequipTool() -- unequip any other tools v.Parent = Character end end end function DequipTools() for _, v in pairs (Character:GetChildren()) do if v:IsA('Tool') then v.Parent = Player.Backpack end end end