Help with combat system ( specifically stun )

So i have 2 problems, one main problem which I will adjust first:
So in my game, I have a stun and combo system: The stun system has a huge issue:
0 seconds : I hit you –> stunned for 1 sec
0.5 seconds l8r I hit you again —> stunned for additional second ( so should be until 1.5 that ur unstunned )
1 second after first hit–> unstuns because the first stun tells the script to unstun rn so the second stun is rendered useless

Similarly to this, my combo system is broken. You can combo people without acctually landing hits,and the reasonfor this is beuase I cant detect if the hit landed. Theirs no way for me to change the variable and check in the same script. Its a similar problem. I dont care about my combo script problem to much, i will make a new post for that l8r unless u get hwat i mean. Anyways please help thanks :smiley: the second and small problem is htat the combat feels unsmooth but i think fixing stuns will fix that

1 Like

How are you preforming the stun are you using attributes? Or BoolValues, etc?

Lua promises may help solving this.

Here’s a cheap hack though:

repeat task.wait() until INSERT DEBOUNCE OR SOMETHING HERE

I am using the stun module which sets walkspeed to 0. I did customize it a bit bu tnot insanley

what? 30 limit lol random words

What I would recommend is everytime you inflict stun, you add a bool value to the player, and have a local script detect if “Stun” is added to the character, and if its added, change walkspeed etc, and when its removed, set the walkspeed and other stuff to normal

oh im so sorry, this is the wrong post, i had already figured this out, thanks for your help tho. I thought this was the post where i needed help w knockback

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.