Console how to change keybinds for equip and disable some keys that handle ui

hi guys!

i want to create costum controls for my roblox game… the thing is i dont know how i would do that
what i need is to somehow change the current keybinds handling tool equip and unequip to become DpadDown for example and the dpadup button to be disabled when it comes to handling ui… i didnt find anything that helpfull online so far so thats why im creating this post for anybody else that has to deal with this later in the future!

many thanks!

(I’m currently on my phone, I’ll give a more detailed answer once I get back home)

You can detect any inputs, from keyboards or consoles, with UserInputService.InputBegan. For equipping tools, you can pass a Tool instance to Humanoid:EquipTool().
So, you can combine both to make a custom Keybind for equipping tools!
Here’s an example for DPadUp for equipping:

game:GetService("UserInputService").InputBegan:Connect(function(Input: InputObject)
   if Input.KeyCode == Enum.KeyCode.DPadUp then
      Player.Character.Humanoid:EquipTool(Player.Backpack.ToolName);
   end;
end);

Note that UserInputService is only available on the client (LocalScripts), so you might have to utilize RemoteEvents/RemoteFunctions so you can listen for inputs on the client and equip the tool on the server side.
Let me know if you have any more questions, or if I didn’t answer your first one, and I’ll answer once I get back home!