Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you slow down the turn speed of an boat?

Asked by 8 years ago

I made a boat and the when I turn it to left/right the turn speed.

This is a script for my boat

The Other Is set to :

BodyGyro : maxTorque : 10000000, 10000000, 10000000 X:10000000 Y:10000000 Z:10000000 P:3000

BodyPosition : D: 1250 maxForce: 0, inf, 0 X:0 Y:inf Z:0 P:10000

BodyVelocity: maxForce: inf,0,inf X:inf Y:0 Z:inf P:1250 velocity:0,0,0

seat = script.Parent
gyro = seat.BodyGyro
pos = seat.BodyPosition
vel = seat.BodyVelocity

pos.position = seat.Position
gyro.cframe = seat.CFrame
speed = 0
ready = true
wait()
seat.Anchored = false

function move(property)
    if property == "Steer" then
        if not ready then
            return
        end
        ready = false
        steer = seat.Steer
        while steer ~= 0 do
            steer = seat.Steer
            if steer == 1 then
                gyro.cframe = gyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.1,0)
            elseif steer == -1 then
                gyro.cframe = gyro.cframe * CFrame.fromEulerAnglesXYZ(0,.1,0)
            end
            wait()
            vel.velocity = seat.CFrame.lookVector * speed
        end
        ready = true
    elseif property == "Throttle" then
        throttle = seat.Throttle
        while throttle ~= 0 do
            if throttle == 1 and speed < seat.MaxSpeed then
                speed = speed + 1
            elseif throttle == -1 and speed > 0 then
                speed = speed - 1
            end
            wait()
            vel.velocity = seat.CFrame.lookVector * speed
        end
    end
end

seat.Changed:connect(move)

1 answer

Log in to vote
0
Answered by
iSvenDerp 233 Moderation Voter
8 years ago

Hi..I'm on mobile so I can't edit your script but u need to use a property called TurnSpeed it effects the well what it says the turn speed. This article should help.http://wiki.roblox.com/index.php?title=API:Class/VehicleSeat Hope this helped let me know of it did or didn't or of u have questions :)(like I said I'm on mobile if it's confusing:3)

Ad

Answer this question