I have a typical combat system GPO style. An issue I am having → if user does uplift attack and no one is there it still proceeds to do Air1,Air2,Air3. But I want to break that logic and make the combo reset back to M1, if not one is hit… Now I know it’s not hard to do what I mentionned butt I have a hard time setting it up with my current combat system.
I have an animation handler and a hit handler.
In my animation handler I play all the animations for m1-m5,uplift-air1,air3
In my hit handler I handle all the damage/hitbox/etc.
How I handle combo reset for M5 and Air3 in animation handler :
if currentTime - playerData.lastPlayed > 1 then
playerData.clickCount = 0
playerData.comboCooldown = false
if playerData.inAir then
playerData.inAir = false
playerData.airComboIndex = 1
character:SetAttribute("AirCombat", nil)
end
end```
For hitbox detect I do something like this ```lua
hitbox.Touched:Connect(function(hit)
if hasHit then return end
local hitCharacter = hit.Parent
local hitHumanoid = hitCharacter:FindFirstChildOfClass("Humanoid")
if hitHumanoid and hitCharacter ~= character then```
What approach can I take to do this here `if the player is doing uplift and did not touch anyone with the hitbox --> apply reset combo logic`