[Hide Inventory System w/o Disabling Tool Usage]

  1. What do you want to achieve?
    I want to hide the inventory (at the bottom) BUT still be able to use it.

  2. What is the issue?
    When using the standard code i.e.:

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

It disables the usage of tools completely, which I do not want.

  1. What solutions have you tried so far?
    I’ve already tried recreating the equipping and unequipping (which I’ve done) but I was hoping if there is a way to ‘keep’ the tool usage mechanic while hiding the backpack / inventory / toolbar / hotbar as I feel my code to be otherwise clunky and highly unoptimised. I’ve also tried Shirooo’s solution but it also feels clunky to me.

Consider using Humanoid:EquipTool(toolName) and connecting it to a UserInputService keybind. Once the tool is equipped, it should be fully useable. I’ve done this myself in one of my games and it worked fine.

If I understand this correctly, you want to disable the normal roblox inventory gui but still be able to use it.

If I were you, I would try using this,

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

Yes this is what I did and am trying to avoid. Though I might be wrong with it being clunky, it’s not really affecting my game that much for now lol.

Eh kind of. That’s the code I already gave yet don’t want, as while the backpack IS usable, the equipping and unequipping (using 1 and 0) is disabled due to this and I STILL have to create new scripts for it, which I do not want to do.

I see.

I’m not totally sure how this would work then/

1 Like

Personally I don’t find it clunky. Here’s the code ripped straight from my game:

local keybinds = {"One","Two","Three","Four"}

if table.find(keybinds,input.KeyCode.Name) then
	local toolName = _G.data.equippedWeapons[input.KeyCode.Name]
	if toolName then
		local tool = player.Backpack:FindFirstChild(toolName)
		if tool then
			char.Humanoid:EquipTool(tool)
			--Unequipping is intentionally disabled for my game's purposes, but it's not that hard to do either
		end
	end
end

Pretty simple stuff honestly. Also easy to implement a custom GUI with.

1 Like

This looks simpler than mine, thanks! I’ll try and analyse it, and implement it also if that’s fine with you :slight_smile:

1 Like

Yeah that’s totally fine. I’m glad to have helped.

1 Like

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