Sorry for my Bad english;
Hi guys, how i can create a Combo when, if a player click mouse between 0.01/ 0.2 sec they go in second animation ecc ecc? And, if the player is slow. the combo reset to the first animation?
Example:
--(when the guy press the first time)
tool.Activated:connect(function()
if canSwing then
canSwing = false
canattack.Value = true
Request:FireServer("Power")
Request:FireServer("Money")
swing1animation:Play()
wait(.2)
-- Now, they need press another time for create the condition for continue the Combo between 0.01 and 0.2 secs, or the condition fail and the resete combo)
swingsound:Play()
if (condition is create) then
swingsound:Play()
Request:FireServer("Power")
Request:FireServer("Money")
swing2animation:Play()
wait(.2)
swingsound:Play()
if (second condition is create)
swingsound:Play()
Request:FireServer("Power")
Request:FireServer("Money")
swing3animation:Play()
wait(.2)
swingsound:Play()
elseif (second condition fail) then
return
end
elseif (first condition fail) then
return
end
spawn(function()
wait(DEBOUNCE_TIME)
canSwing = true
end)
end)
tool.Deactivated:connect(function()
canattack.Value = true
end)
i write it so fast, sorry for the errors, how i can set the time between the guy need click for continue the combo? Ty

2 comments
This is by no means a perfect code or even one that you can use in your game, it's to give you an idea of one way to do it. I missed some things like debounce and how you play other combo attacks because I am sure you can do them yourself :D Good luck and I hope this helped :)
If anything is unclear please let me know. I will do my best to make is otherwise.