Check if attack misses

i haven’t seen anyone really talk about this so i’m gonna ask about it now, how do i check if the Touched event wasn’t fired. Basically what i wanna do is when a remote is fired, an animation would play and if the hitbox was touched, it would play a cutscene. However if it missed, nothing would happen except the hitbox destroying itself and the animation stopping

When wanting to check the logic flow I use prints for each section where a branch is possible to occur.
Perhaps doing that will help you here.

By the title, I assume it’s a tool? If it is so, then you know when the player is going to attack, by tool.Activated. You can get a target by checking if the tool hit something. If the target is nil, doesn’t it mean that the attack missed? Even if it isn’t a tool, the same logic can be applied if you know when the player tries to attack.

I’m not sure if I understood your post right but this is my interpretation.

1 Like

solved it by adding a check when the remote was fired, if it hit then the variable would be checked. If it wasnt checked in a second, the animation would stop.