Help and Feedback Scripting Support
Hello, I would like to make my boat model on the water and be able to drive it using gui buttons, any ideas on how to do it?
I’m not really sure how to start, someone could guide me
2 Likes
This was already answered before.
Seriously? and when was that?
to make the boat move
Gui Buttons
2 Likes
Roblox
Check out Boating on the sea. It’s one of the millions of unique, user-generated 3D experiences created on Roblox. Boating on the sea is a game that you can drive any boats,ships and more. This was inspired by The Boating Lake you can play it here...
Check out Ride Down a Boat Aventure!. It’s one of the millions of unique, user-generated 3D experiences created on Roblox. In this game you spawn a boat then you go down the slide! Please favorite and like if you enjoy this game! :D
1 Like
I made a boat model before, here it is: Boat - Roblox
2 Likes
This post was flagged by the community and is temporarily hidden.
1 Like
Its not working for everyone. just check status.roblox.com
2 Likes
why should i use tween?
Nope, it’s also for objects. yhvjc
It really depends on how you want your boat to be like.
The easiest is to use the physics engine and simply build a boat that floats on water. I also recommend if you are doing this way to add ballast at the bottom of the boat so that it doesn’t flip over. (Most sea vessels have a ballast except very small boats) You can use the AlignOrientation along with the LinearVelocityConstraint to move the boat.
If you don’t want normal physics then you can simply set the Y velocity to 0 and keep it that way. Or you can even make your own “SeaMap” where height can be retrieved from a formula. You can even if you want to use Vector forces and mimic the floating of objects through a buoyancy formula. It’s much harder to do but it can give you a lot of experience.
You definitely shouldn’t be using tweenservice for vehicle movement. Instead either use Constraints or custom psychics.
2 Likes
Or even better. Bodyvelocities
1 Like
Here are some general instructions:
- Create a remote for the forward motion.
- Send a signal every time the state changes (-1 for backwards, 0 for nothing being pressed, 1 for forwards).
- Use your UI to control this.
- Create a remote for the turning direction.
- Send a signal every time the state changes (-1 for left, 0 for nothing being pressed, 1 for right).
- Do your physics on the server.
- I’d recommend a BodyPosition with the MaxForce set to something like (0, big number, 0). This is to keep the boat above the water.
- Use a BodyGyro to keep the boat upright. If you know some CFrame math, you can also use this to make the boat bank when turning.
- Use the data from the remote to update a value representing the turn state (-1, 0, 1). On heartbeat, update the BodyGyro (based on the change in time, step).
- Create a similar variable representing the motion state (-1, 0, 1). Create a BodyForce. On heartbeat, update the BodyForce (based on the motion state and the step).
If you want to do the physics on the client so there isn’t delay between the input, you can give the player network ownership (seach on dev hub) when their character hops in the seat on the server. This allows the client to control the boat’s physics (which makes it respond without delay to inputs). While this is good, it allows crazy exploits (flying boats, smashing characters with boats), and boats generally aren’t very responsive anyways.
to make the boat move
Tweening is a good idea if the boat is for a cut scene or something. If the player is actively controlling it, this isn’t a good idea.
You can use a tween to control the turning or BodyForce, though the BF is already smooth and the BodyGryo’s max force can be reduced to make that even smoother.