Disabling client's jump doesnt stop it on the server

Is there a way to disable the player’s jump without needing remote events or adding extra code on the server? Using ContextActionService works, but I didn’t wanna add a tiny tip of CAS just for this.

The issue is quite simple.

I’ve rebinded the space key to the parking brake, and it works completely fine until another player enters my vehicle or my vehicle touches another instance that doesn’t share the same network ownership.

When that happens, whenever I press the key, the player jumps out of the car for other players, but not for me.

So far, I’m only using UserInputService for pretty much everything.

Would there be a way to disable the player’s jump input without needing remote events or adding extra code on the server? Using ContextActionService works exactly as I want, but I didn’t wanna add a tiny tip of CAS just for this.

Are you assigning network ownership of the car to the driver? Although you should ideally disable jumping more robustly it may work to force the network ownership.

humanoid states do !!!NOT!!! replicate

1 Like

You can disable jumping on a humanoid by using Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)

More info: https://create.roblox.com/docs/reference/engine/classes/Humanoid#SetStateEnabled

When the player enters the car, you can disable jumping, and when they exit the car you can re-enable it again.

Hope this helps

That being said, I think you should try manually setting the network ownership of the car to the driver as it looks like that might be the issue rather than disabling jumping.

Yep, I did disable the jump and set the network ownership.

I’ll mark the post as solved soon since I did a band-aid fix by using CAS. I just wondered if there was another way of doing so without using it.

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