Currently the backqoute (`) key opens up player backpack, I want to unbind it but I cant seem to find the action name under action bindings in the dev console.
This is a snippet that binds the backqoute action, when you equip a tool, then unequip it. It is just so show you the basic way you could do it. You will have to change it, and modify it, but it should help.
local ContextActionService = game:GetService("ContextActionService") local ACTION_RELOAD = "Reload" local tool = script.Parent local function handleAction(actionName, inputState, inputObject) if actionName == ACTION_RELOAD and inputState == Enum.UserInputState.Begin then print("Reloading!") end end tool.Equipped:Connect(function () ContextActionService:BindAction(ACTION_RELOAD, handleAction, true, Enum.KeyCode.96) -- 96 is backqoute end) tool.Unequipped:Connect(function () ContextActionService:UnbindAction(ACTION_RELOAD) end)
For more info on UnBinding: unbind article
For a full list of keycode (to use when binding/unbinding): list of keycodes
This should solve your problem (hopefully), just let me know if you have any more questions.
No, my problem is I cant find the action name for the backpack so I can’t unbind the key.
Wouldn’t you need to just disable the backpack?
local StarterGui = game:GetService("StarterGui") local Fired, Err -- Not the best, but it works just to prevent errors -- repeat print("Trying to disable backpack") Fired, Err = pcall(function() StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false) end) wait(0.1) until Fired print("Disabled backpack!")
Ah thank you, I think I might’ve misinterpreted this post then
No problem! Hope it helps you out!