I recently made a boat (Model). This boat works fine but I want it to only be able to rotate around the Y axis so it doesn’t go up/down when it hits a part. Here’s my script
seat = script.Parent.VehicleSeat
velocity = seat.BodyVelocity
bg = seat.BodyAngularVelocity
while true do
if seat.Throttle == 1 then
velocity.velocity = seat.CFrame.lookVector * 10
end
if seat.Throttle == 0 then
velocity.velocity = seat.CFrame.lookVector * 0
end
if seat.Throttle == -1 then
velocity.velocity = seat.CFrame.lookVector * -10
end
if seat.Steer == 1 then
bg.angularvelocity = Vector3.new(0,-1,0)
end
if seat.Steer == -1 then
bg.angularvelocity = Vector3.new(0,1,0)
end
if seat.Steer == 0 then
bg.angularvelocity = Vector3.new(0,0,0)
end
wait()
end
Before I hit the part I can drive around / only rotate the boat around the Y axis.
This is what it does when I hit a part.
Once this happened I can drive to the sky. How do I fix this? / How do I only let it rotate around the y axis so it can’t do that.