I’m trying to use VectoryForce to control the acceleration of my vehicle. However, the car when it turns is stuck in the drift state and the velocity doesn’t change and follow it for smooth movement. I have tried to change a few numbers and it’s not done anything here are some attributes and things used:
this is the acceleration
local lv = (engine.CFrame*CFrame.Angles(0,math.rad(90),0)).LookVector
engine.VectorForce.Force = Vector3.new(lv.X,0,lv.Z)*(script.Parent:GetAttribute("Speed")*vehicleSeat.Throttle * vehicleSeat.AssemblyMass)
this is the rotational stuff
if vehicleSeat.Throttle ~= 0 then
--This changes the angular velocity by multiplying the turn speed by -1 or 1 (Steer Property)
engine.AngularVelocity.MaxTorque = math.abs(vehicleSeat.ThrottleFloat) * vehicleSeat.Torque
if vehicleSeat.Steer == 1 then
if engine.AngularVelocity.AngularVelocity.y > -script.Parent:GetAttribute("TurnSpeed") then
engine.AngularVelocity.AngularVelocity = Vector3.new(0, engine.AngularVelocity.AngularVelocity.y + -.06,0)
end
end
if vehicleSeat.Steer == -1 then
if engine.AngularVelocity.AngularVelocity.y < script.Parent:GetAttribute("TurnSpeed") then
engine.AngularVelocity.AngularVelocity = Vector3.new(0, engine.AngularVelocity.AngularVelocity.y + .06,0)
end
end
if vehicleSeat.Steer == 0 then
engine.AngularVelocity.AngularVelocity = Vector3.new(0,0,0)
end
else
engine.AngularVelocity.AngularVelocity = Vector3.new(0,0,0)
end