Disable Spacebar to jump

I want the space bar to not make the player jump since I’m using that key for something else. But I still need JumpPower to not be 0 because the player is able to jump. Is there a way to do this?

2 Likes

After going through the player modules, I don’t think it would be possible to change the default jump button without creating a custom character controller.

Actually it is possible. Based on what @soutenu said, you can unbind the jumpAction bind from CAS and implement your own jump controller.

ContextActionService:UnbindAction("jumpAction")

You have to provide more details of your use case so we can provide an accurate solution.

1 Like

Override the spacebar using CAS (ContextActionService).

EDIT: jumpAction was the thing I was thinking about. You should bind an action over it to temporarily disable jumping then unbind the action to get the behavior back. Simply unbinding jumpAction will remove the behavior all together and you will have to do more work by implementing jump behavior yourself.

7 Likes

I do not recommend making the spacebar disabled. Because, disabling spacebar will only disable jump for PC players, not xbox or mobile.

Binding an action over jumpAction will temporarily disable jumping. jumpAction also works on other devices.

Do you mean when a player touches a part it makes their jump power to 0 for a period of time? please be more specific of what your trying to say.