Make car accelerate and slowly lose speed when not

Hi! Im making a car, it works fine except for that it loses its speed on the wheels almost instantly when i dont accelerate. That also stops the entire car. Is there a way to increase the speed when i hold W and when i release it slowly loses speed? Im using hingeconstraints, a base and wheels, Thanks! I also posted this in building support incase i needed to change something in the car.

Set the max torque to 0 otherwise if the speed is 0 it will apply a braking force.

1 Like

I set the maxtorque to 0, but it didnt move at all. Should i try MaxAcceleration?

The problem is that the wheels instantly just stop whenever i dont accelerate

instatiate a bool value

create a function

local bool_released=false
function onrelease()
 while bool_released do
  gradually decrease the speed of the car by the amount required
 end
end

change the boolvalue to true when you release ‘w’ and vice versa