I don’t want to disable jumps entirely as i’m creating a custom jump for my character where you wind up slightly and then jump using Humanoid.Jump .I have tried unbinding it with ContextActionService,but it’s very unreliable and most of the time it does not work.
local ContextActionService = game:GetService("ContextActionService")
ContextActionService:UnbindAction("jumpAction")
I forgot to mention but the custom jump I have uses the roblox jump function,I am simply just making a regular jump but with a windup.Setting jump power to 0 will ruin this entirely.
The way contextactionservice works is that it overrides the previously bound action. So technically you could bind jumpAction to an empty function an it would work.
The reason why your script only sometimes works is because the script runs too fast before the game loads. You can stop this by using:
In order to truly get it work I use CAS’s :Sink() attribute.
local noJump = "jumpAction"
CAS:BindAction(
noJump,
function()
return Enum.ContextActionResult.Sink
end,
false,
unpack(Enum.PlayerActions:GetEnumItems()) --optional, I recommend but if it screws stuff up I'd remove
)