BodyVelocity/Gyro Movement System

I’m attempting to make a boat system but first I want to get the movement down, and because I’m not that good at math and cframing etc I’m having a few problems.

Currently I have this, a part that moves on its own and can be steered by holding down A or D.
The part is supposed to move to where the front is facing (does that make sense?) but as you can see at 0:04 in the gif, it’s off. I can’t seem to get it right.

The script is a normalscript and it’s located in the seat.
Video of it moving: https://gyazo.com/9c8af9817d7bc293b0266e9b0a00a14b.mp4

The code:
Click here
(for some reason it wouldn’t format correctly here)

I have also tried using RenderStepped in a localscript but the outcome was this:
https://gyazo.com/acf0d4e389c60eb9001d733828608b07.mp4

The code for that: Click here

Well, thank you for your time! :smiley:
EDIT: Added place file
devforum.rbxl (16.2 KB)

1 Like

You should use bodythrusts instead of bodyvelocity for movement. BodyVelocity isnt relative to the parts position, with bodythrust it is relative so something like Vector3.new(0,0,-200) would make it move forward in the direction it is facing.

How would I go about using BodyThrusts? I’m reading the wiki right now but I’ve never used them.

On BodyThrusts it goes like this. .Location is where the force is applied (0,0,0) is at its center, .Force is how much force is applied. The force moves along the part’s own axis (if the part was facing 0,0,22 then you applied force to the Z axis, it would move along at that direction and not the game’s axis). I modified your script as a demonstration of what I mean
https://gyazo.com/0049bb374d23e6f0e2f5b9ccb3001861

2 Likes

I see. Is it possible for you to give me the modified script?
If not, that’s fine and I’m sure I would be able to do it on my own.
Thank you very, very much for your time :slight_smile:

here you go, and no problem
devforummodified.rbxl (16.2 KB)

Thanks again, alot!

1 Like