Preventing boat from tipping

  1. What do you want to achieve?
    I want this boat in my game to be able to turn left and right (green axis) only, and not be able to rotate on the other 2 axis, and I want the boat to stay level with the water (Y = -14)

  1. What is the issue?
    I’m not using roblox terrain water, so my water won’t make objects float. Also, there could be lots of these in the game at one time, so the scripts need to be efficient (preferably only 1 loop or event so these won’t lag the game if there were like trillions of them)

  2. What solutions have you tried so far?
    All solutions I’ve found on the devforum don’t cover how to make this work without terrain water. I’ve tried using AlignOrientation, but I can’t figure out how to make that allow rotation on only one axis, and not on the other 2

Here is a past script I’ve tried, which didn’t work, since AngularVelocity doesn’t prevent rotation on the other 2 axis:

Seat.Changed:Connect(function() -- VehicleSeat
	script.AngularVelocity.AngularVelocity = Vector3.new(0, -Seat.Steer, 0)
	script.LinearVelocity.LineVelocity = 50 * Seat.Throttle
end)

I’m pretty sure it’s how you use the AlignOrientation properties like AlignType and PrimaryAxis(Parallel or Perpendicular)

Despite what I said here, I did end up getting this to work just by messing with the attachment’s orientation a ton. I had tried this before making the post but I must’ve not had it rotated right

Unfortunately a lot of the constraints (like angular velocity) were interfering with each other causing other issues which I fixed later, but this did end up working, so thank you for the help

1 Like

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