-
What do you want to achieve? I want a tool that equips when you hit 1 and unequip when you hit 2 or 3 or 4 or 5 but not when you press anything else.
-
What is the issue? The tool unequips when you hit anything instead of only 2, 3, or 4,
local One = Enum.KeyCode.One
local Two = Enum.KeyCode.Two
local Three = Enum.KeyCode.Three
local Four = Enum.KeyCode.Four
local Five = Enum.KeyCode.Five
local Key = Enum.KeyCode
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == One then
for i,v in pairs(PlayerBackpack:GetChildren()) do
if v.Name == Backpack[1] then
Character.Humanoid:EquipTool(v)
print(v.Name)
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Two or Three or Four or Five then
Character.Humanoid:UnequipTools(v)
else
print("Not equiv to []")
Character.Humanoid:EquipTool(v)
end
end)
end
end
end
end)