So im making a car in roblox studio i have modeled it and its working but it had drift i want to know how i can stop it it has many scripts in the car but the script that drives the car is this…
–{
local car = script.Parent.Parent.Parent
local Seat = car.DriveSeat
local RightFwheel = car.RightF
local LeftFwheel = car.LeftF
local RightRwheel = car.RightR
local LeftRwheel = car.LeftR
local RightSteering = car.RightSteer.Servo
local LeftSteering = car.LeftSteer.Servo
local Carspeed = script.Speed
local Acceleration = script.MaxTorqueAccel
local SteeringSpeed = script.Steerspeed
local SteeringAngle = script.Steerangle
while true do
RightFwheel.Motor.MotorMaxTorque = Acceleration.Value
LeftFwheel.Motor.MotorMaxTorque = Acceleration.Value
RightRwheel.Motor.MotorMaxTorque = Acceleration.Value
LeftRwheel.Motor.MotorMaxTorque = Acceleration.Value
RightSteering.AngularSpeed = SteeringSpeed.Value
LeftSteering.AngularSpeed = SteeringSpeed.Value
RightSteering.ServoMaxTorque = 10000
LeftSteering.ServoMaxTorque = 10000
RightSteering.TargetAngle = Seat.Steer * SteeringAngle.Value
LeftSteering.TargetAngle = Seat.Steer * SteeringAngle.Value
Avelocity = Carspeed.Value * Seat.Throttle
RightFwheel.Motor.AngularVelocity = -Avelocity
LeftFwheel.Motor.AngularVelocity = Avelocity
RightRwheel.Motor.AngularVelocity = -Avelocity
LeftRwheel.Motor.AngularVelocity = Avelocity
wait()
end
–}
I have no idea why its giving it the drift i have is rigged up with springs rods and motors this is a video of the drift. In the vid look at when the weels stop turning and see that the car slides.
robloxapp-20220215-1143186.wmv (2.3 MB)
If you have any ideas on that could be the problem any help would be great! I did look for tutorials on how to fix this but i could only find them about how to make drift not about how to remove drift so idk what to do.