How do you keep a player aligned with boats (grounded and in air)

What do I want to achieve?
I want players to be able to stand on moving boats without shifting around and jump on moving boats without losing momentum.

What is the issue?
(These problems only occur when the boat is moving)

  1. When I stand on the boat, my character shifts around without user input.
  2. When I jump on the boat, my character loses all momentum and gets misaligned with the boat.
    Example video:

What solutions have I tried so far?
I have read through all the dev forum posts I could find and tried their solutions, but nothing worked for me.

  1. My own system. I tried to use forces to constantly apply the character’s velocity when they leave the ground until they land again or leave the ship, but sometimes the player doesn’t have velocity, or not enough to follow the ship, and I think the velocity sort of fades to nothing, not snaps, so it stacks with the character’s start velocity.
  2. Roblox’s physics humanoid. I tried it, but when the ship rocks up and down from the waves, my character phases through the floor. Even if I could fix this, I’d rather use a normal humanoid because then I don’t have to rescript some of the core scripts.
  3. Jailbreak train system. This one was close, but the player slides a lot more and in the direction the ship is traveling and sometimes gets flung.

For my game, the ship feeling bad to the player would not be good, so any help is greatly appreciated!

The other Jailbreak train system:

Honestly not too sure what it’s really doing but I know it works. Tweak it to fit your need I guess

That’s the one I tried, but it didn’t work for my boat.
I’m pretty sure that’s more for anchored stuff, but my boat isn’t anchored, so it causes problems.
My result is the same as this guy’s result: Jailbreak train platform system? - #69 by ClassicMasterNoob
I will look further into this and try to find a fix, but in the meantime, thanks for helping.

Ok, I ended up modifying this in a way that got a better result.
This result is probably feasible, but it does add one problem that I can see players abusing.
Basically, if you jump into a wall on a ship, you can push it. I tried setting the ship’s density to a high value, but it still happens. I’ll keep trying to fix that though, and for now, I’m happy with the result
Example video of result and new problem:

Edit: Increasing the weight of the ship does seem to sort of fix the ability to push to boat, so I’d say this is a good result for me.

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