I'm trying to restrict a "Skill" which can be activated by pressing the Skill Icon using m1 and keyCode.one but for some reason this code isn't working
UserInputService.InputBegan:Connect(function(input, event)
local keyBind = input.KeyCode == Enum.KeyCode.One
local clickBind = input.UserInputType == Enum.UserInputType.MouseButton1
if event then return end
if keybind or clickBind then -- check keybinds
toggleEquip()
elseif clickBind and equipped then
-- some animation code here
end
end)
but if I stick with:
if keyBind then -- check keybinds
toggleEquip()
elseif clickBind and equipped then
-- some animation code here
end
it only works if I use "1" key, anything I can do? if so please point out my mistakes.
** You are now Level 2! **