How to disable auto jump when sitting down

I’m making a train that moves using MoveTo and every time a player sits on a seat, he will auto jump when the train moves. Is there a way to stop this?

Not sure if :MoveTo is something commonly used for a train to move around. However, you can disable the AutoJumpEnabled property under Humanoid when you’re seated down and then after enable it when the user is not seated. Your train may be anchored which could be the reason why it could be auto jumping?
I think because of the :MoveTo function, the BaseParts associated to it have to tag along to the primary part’s position which can bring delay. I had an issue with an item placement tool I was making using the :MoveTo function because it doesn’t instantaneously move all at once. I may be wrong
Welds might be a better choice for this.
However, refer to this for more information about the AutoJumpEnabled property and see if that’s the case for your issue

3 Likes

Thank you. I’m only using MoveTo as when I’ve tried using pathfinding service and tween service the rotation wasn’t realistic. I’m not too sure on how to use bodymovers either.

1 Like

You should look for existing examples for ideas if you’re unsure or look a tutorials on youtube or other relevant resources such as the Roblox Wiki or Scripthelpers

I have looked, I’m unable to find anything. The train is sorta like what Jailbreak has but more for moving players to different stations.

I’m not sure what I can scramble from player moving trains but I’ll probably give it a shot.

Best of luck!

1 Like

@uJordy

Disabling the AutoJumpEnabled property is not the proper solution for this. AutoJumpEnabled is intended for touch controls and making characters jump if there is an obstacle in their path.


Ideally to prevent jumping, you’d want to pseudo-anchor the character by preventing them from actually jumping. There are many methods available for you to accomplish this. Here are a few I do know of:

  • Setting JumpPower to 0
  • Forcing the Humanoid’s Jump property to false
  • Forcing the Humanoid’s Jump state not to enable (or disabling it)
  • Sinking the input for the space bar input using ContextActionService
  • Using the explicit disable jump code from UserInputService.JumpRequest (which could be found by using the search bar)
4 Likes

Oh right, then you’d need some sort of function keybind or UI button to operate to restore these powers.