How do I make my ship model move?

So I’m making a stop the payload type game with pirate ships. One team spawns on an island with small ship spawners, And another team spawns on a large ship and must protect it with the cannons onboard until it crosses the map to safety.

The problem is I don’t know how to make the large ship model move without it being controlled by a player, Tweens won’t work because you can’t ride on tweened parts.

The model is unanchored and welded to an anchored part called “MainPart” within the model
It also contains a Humanoid object.

Any and all help would be appreciated! :grinning:

Try using the MoveTo function

1 Like

Wouldn’t that practically make it teleport to it’s new location?

No, as it says, it moves smoothly, and you can ride on it from what I know

Does the player control the ship’s movement, or does it just travel a straight line? If so you could just use a PrismaticConstraint.
Or you could use a VectorForce to move the ship.
Either way would be using physics so players would be able to move around on the ship.

2 Likes

You can try using LinearVelocity it’s the new BodyVelocity

There’s an anchored part though, If I unanchor it then other ships will be able to push it off trajectory

If you use MoveTo you shouldn’t have problema, you need a PrimaryPart taht is not Anchored, and it will move regardless if something moves it, they will be moved not the big boat

I’ve looked into MoveTo but I’ve only seen it used on players/ npcs, How exactly would it work with a model?

It works exactly as with an NPc from waht I know

I just realized there has to be an anchored part in order for my sinking function to work :face_with_spiral_eyes:

It only works that way when used from a Humanoid. Using MoveTo on a model will just teleport the model to a new position. He wants the velocity of the boat to move.

It is technically a humanoid, But it still wouldn’t work because the MainPart has to be anchored

What if when the sinking function has to go you anchor the part? That should work

The ship has to basically float, It can’t just slide along a surface as I’m using roblox terrain water

Then I don’t know how you would do that sorry

It’s alright, Thank you for trying to help :sweat_smile:

1 Like

you could use :PivotTo() on the model but I don’t think it would be smooth if you wanted it to float on water. I think unanchoring it is the best solution. You could try adding weight to prevent other ships from being able to push it off trajectory.

But as I asked before, does it move in just a straight line, or does it steer around.
If it’s just straight line then use a PrismaticConstraint.