I am trying to make it so when you press a button with the around mid-2014 backpack, it will not call ActivateGear(num). The problem is: it’s not firing! I added prints to test it, but when I press 1 on my keyboard, it won’t call ActivateGear(num) or print(“1”). Here’s my code:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(key)
if key == Enum.KeyCode.One then
activateGear(1)
print("1")
elseif key == Enum.KeyCode.Two then
activateGear(2)
print("2")
elseif key == Enum.KeyCode.Three then
activateGear(3)
print("3")
elseif key == Enum.KeyCode.Four then
activateGear(4)
print("4")
elseif key == Enum.KeyCode.Five then
activateGear(5)
print("5")
elseif key == Enum.KeyCode.Six then
activateGear(6)
print("6")
elseif key == Enum.KeyCode.Seven then
activateGear(7)
print("7")
elseif key == Enum.KeyCode.Eight then
activateGear(8)
print("8")
elseif key == Enum.KeyCode.Nine then
activateGear(9)
print("9")
elseif key == Enum.KeyCode.Zero then
activateGear(0)
print("0")
end
end)
Any help will be greatly appreciated. Thanks!