How could i make a boat to float and drive?

Hello there, i really want to make a boat that drives and a player that can stand on it withough falling(the water whould be a part not terrain)

How can i create such thing?

Any help would be appreciated!

1 Like

I had the same exact problem about a day ago, but I found this youtube video that shows you how to make a very functional boat that can be used on a part.

2 Likes

You can use body mover like BodyVelocity they make it so easy

1 Like

For the boat to float, it needs to use the Density property. All BaseParts (parts, unions, meshparts, etc) have a Density property within the CustomPhysicalProperties section. Your boat will sink if it’s denser than water. So you have make your boat less denser than water, I think you should make it as .15 for each part within your boat model depending on how many parts there are on the boat. You can try making it a bit more or less, that’s up to your boat. You have test it every time to see if it’ll sink or not.

For it to drive, you can use BodyAngularVelocity so that it can also turn. At least that’s what I used when I made ships if I’m not mistaken. You can look at some articles about BodyAngularVelocity and other types of BodyMovers.

2 Likes

First, you need to get the float height. You can either use raycasting (pretty hard) or just use a set height (assuming all your water is the same height).

After that, you need your boat to float at that height. You can use a BodyPosition for this. Set the BodyPosition.Position to (0,yourHeight, 0) and set the BodyPosition.MaxForce to (0, largeNumber, 0) (the large number should be big enough to lift your boat, though if it’s too high your boat might move to the float position with too much force to be realistic).

Then you’ll need your boat to stay stable. You can use a BodyGyro for this. Then do what you did with the BodyPosition (but set the BodyGyro.MaxTorque to non-zero numbers on two axes, and set the BodyGyro.CFrame to an upright CFrame).

To control the boat, I’d use a BodyVelocity then use the BodyGyro.CFrame to turn the boat.

1 Like