INFORMATION: I was making a left and right mouse button hand-to-hand combat system, but I've hit a stump that i need help solving.
PROBLEM: I wanted to make it where if you press the left button four times than the right button quick enough, it would do a special action, but when I test it out, nothing happens.
CODE:
UserInputService.InputBegan:Connect(function(Input, Processed)
if Processed then return end
if Input.UserInputType == Enum.UserInputType.MouseButton1 then -- Light Attack
if not Attacking then
Attacking = true
Action = "Light Attack"
if Airborn == true then
print("Air Cancel")
-- Stuff
else
print("Light Attack")
-- Normal Function
if tick()-Timer > 1 then
L_Combo = 0
H_Combo = 0
Action = ""
end
L_Combo = L_Combo + 1
-- Combo Function
if H_Combo == 3 and L_Combo == 1 then
print("Kick Away")
H_Combo = 0
L_Combo = 0
end
--[[
local Animation = Humanoid:LoadAnimation(Animations["L_Attack"..L_Combo])
Animation:Play()
Events["Attack"]:InvokeServer(Action)
--]]
if L_Combo >= 5 then
L_Combo = 0
end
end
wait(0.4)
Attacking = false
Action = ""
end
elseif Input.UserInputType == Enum.UserInputType.MouseButton2 then -- Heavy Attack
if not Attacking then
Attacking = true
Action = "Heavy Attack"
if Airborn == true then
print("Downward Kick")
-- Stuff
else
print("Heavy Attack")
-- Normal Function
if tick()-Timer > 1 then
L_Combo = 0
H_Combo = 0
Action = ""
end
H_Combo = H_Combo + 1
-- Combo Function
if L_Combo == 4 and H_Combo == 1 then
print("Launcher")
H_Combo = 0
L_Combo = 0
end
--[[
local Animation = Humanoid:LoadAnimation(Animations["H_Attack"..H_Combo])
Animation:Play()
Events["Attack"]:InvokeServer(Action)
--]]
if H_Combo >= 4 then
H_Combo = 0
end
end
wait(0.5)
Attacking = false
Action = ""
end
end
end)
Can I get some assistance on solving this?

2 comments
what is dis
ok ill just focus on what u want