I’m working on a soulslike game with multiple characters, abilities for the characters are not meant to be used at the same time and have checks to stop this.
When a player presses 2 keys at the same time the system ignores the Booleans that check to see if another ability or attack is running because they start at the same time before the Boolean is enabled.
I have tried adding debounces checks like “isusing___” etc but when two UIS events fire at the same time they start before the booleans are enabled, I have also tried adding slight waits in each ability of a different time but it made the combat feel a little unresponsive and clunky.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
if isTyping then return end
if isswinging then return end
if Character.isinattack.Value == true then return end
if Character.isindash.Value == true then return end
if Character.Vulnerable.Value == true then return end
if input.KeyCode == Enum.KeyCode.F then
Thanks for changing it! Now, in the video, it looks like the player swings before the block. You could potentially be not changing the isswinging value, or you should try debugging by adding a print statement before the start of your checks like this: print(isTyping,isswinging,Character.isinattack.Value,Character.isindash.Value,Character.Vulnerable.Value)
Also, I noticed that isswinging is not referring to a value, but I assume you already know this.
It seems when two actions start at the same time all the checks return false however when I check while the actions run, their respective checks return true but the action has already started, I could probably cancel all actions early when they have the checks return true mid action.
Aside from a slight jumpy movement from canceling an action, although the values were applied at the start, checking during the action and canceling it when it returned true fixed the player pressing both keys at once.
Thank you for your help!! Have a great rest of your day : ) Watch hfddh | Streamable – video of the fix