I want to be able to equip a tool with the toolbar and backpack disabled/unviewable, how would I do so? Is it possible? I tried disabling the backpack and it worked but (of course) I can't equip any tools. Anybody know how I'd pull this off?
COMMUNITY QUESTION
How can I equip tools even while the backpack is invisible, is it possible?
1 answer
Here's how it works naturally. Tools in the backpack get displayed on the toolbar hud. When you press a key that is bound to the given tool by roblox, the tool is moved from backpack to the player's character. Therefore, we can do something like:
local UIS = game:GetService("UserInputService")
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
UIS.InputBegan:Connect(function(key,gameProc)
if not gameProc then
if key.KeyCode == Enum.KeyCode.One then
plr.Backpack.SomeTool.Parent = char
end
end
end)
Of course, you could clone the tool into the character and then destroy it from the backpack. The real issues you need to worry about are ordering the tools in the backpack by number and removing previously equipped tools when a new one is equipped!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
https://www.robloxdev.com/api-reference/function/Humanoid/EquipTool