Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
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.