DRIFT PROBLEM WITH AIRSHIP SCRIPT
As the title states I have a weird drift problem with my airship vehicle. The vehicle functions with linear and angular velocities placed on the vehicle seat (see image) and parented to my control script (see code)
Control Script Code:
local seat = script.Parent.VehicleSeat
local fuelValue = script.Parent.Fuel
local steerAngle = 30
local speed = 60
seat.Changed:Connect(function()
if seat.Steer == 0 then
script.AngularVelocity.AngularVelocity = Vector3.new(0, -1 * seat.Steer, 0)
script.LinearVelocity.LineVelocity = 50 * seat.Throttle
end
if seat.Throttle == 0 then
script.LinearVelocity.LineVelocity = 50 * seat.Throttle
script.AngularVelocity.AngularVelocity = Vector3.new(0, -1 * seat.Steer, 0)
end
end)
Workspace setup:
Video of Problem: Weird Drift Bug
Illustration of how I setup the linear and angular velocities:
Any help would be appreciated. I can also share the settings of the linear and angular velocities.