local MaxSpeed = 5000
local Base = script.Parent.Parent.Base
local BaseDensity = .2
local Spin = script.Parent.Parent.Steer.BodyAngularVelocity
script.Parent.Changed:Connect(function(property)
if property == “ThrottleFloat” then
local speed = 1150
local Engine = script.Parent.Parent.Engine.BodyThrust
Engine.Force = Vector3.new(-speedscript.Parent.ThrottleFloat,0,0)
end
if property == “SteerFloat” then
local TurnSpeed = .5
Spin.AngularVelocity = Vector3.new(0, -TurnSpeedscript.Parent.SteerFloat,0 )
end
end)
my issue is when it touches per say a part or land when it rotates it gets stuck in that rotation as shown here
I’ve tried other methods of creating boats and they work… but i want to make it be able to rotate as a ship would but also return to the natural rotation
I thought of trying that but my issue is, i still want it to rotate if it gets hit by something
edit: sorry if I don’t make sense im not the best in coding knowledge
Rotating on it’s current Y is easy, just make the natural orientation Vector3.new(0,Part.Orientation.Y,0).
It won’t change how the boat is rotated, but will go back to it’s upright direction.
I have tried many other things people told me to do but none of it works I think maybe I should find another way to make a boat because this one seems to not work so well…
What do you think would be a good way to create boat, again sorry for the bother.
Use a BodyGyro and adjust the forces applied to allow some rotating on the Y axis, but enough force that it still goes back to normal when the collision ends.
Edit: Make sure to set the MaxTorque to 0 for both the X and Z axis. This will allow your boat to still work as it does now.
I added a bodygyro but now it wont turn…
Edit: it turns but it still gets stuck
Edit again: so three things happen, I can either only turn on my right side and still get stuck, not turn at all and stop being stuck or turn on both sides and be stuck
The body gyro should only be preventing the boat from tilting, not turning. If this is not what you are experiencing then you likely need to adjust the properties of the body gyro.