Hi! I’m trying to make a combat system using another developers module for changing the characters Speed and Jump property.
Normally in battleground type games they have 4 M1’s with three variants for the last one: Uppercut, Downslam, and just the normal Push.
Whenever the player is trying to use an uppercut, the characters jump power will be set to 0… even if the jump property is set to 0, the player is still able to jump. I’ve tried to fix this, it worked but it cost the downslam being delayed badly.
The video that’s showed below is the problem I’m encountering:
I’d appreciate it if someone corrects my stupidity. I’ve been trying to fix this problem for 2 days T-T
The documentation for Humanoid.JumpPower recommends using Humanoid:SetStateEnabled() to disable the ability to jump rather than setting JumpPower to 0; that could be a possible solution for that use case.
Example
local Humanoid = -- Reference to Humanoid here
-- Call this to disable the ability to jump
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
-- Call this to allow the Character to jump again
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)