Temporarily disable tool selection with numbers

My game uses the default tool selection gui for weapons. So if there is a weapon on slot 1, pressing 1 will equip/unequip it.
How can I temporarily disable this feature, so that pressing 1 doesn’t equip/uneqip tool?

Why?
I want to add a voice command system, where player presses X, a gui pops up saying 1 - charge, 2 - defend, 3 - taunt, etc… And when player presses 1, the gui disables and charge sound plays. I know how to do this, but I don’t know how to make it so that pressing 1 also does NOT do anything with tools.

You can disable the Inventory UI when the voice command system is active

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
3 Likes

You can do what @CZXPEK mentioned, but another option would be to create a custom hotbar for your tools if you want to keep the UI for it visible. That and it would probably look better (and more professional) over using Roblox’s defaults.

1 Like

I used @CZXPEK method for now, but yeah, I’m planning to implement custom tool gui in the future.

Here’s the result btw - I Voice Acted for My Own Game {Skeletal Frenzy}