How to use VectorForce on a car

My car is very slow at accelerating, it is realistic, but I do not want it to be like that, Ive read about VectorForce and it maybe the solution, I just dont know how to implement it into my current Car Functionality Script.
Current Script:

local runService = game:GetService("RunService")

local MAX_SPEED = 120
local MAX_STEER = 30

local car = script.Parent
local driveSeat = car.DriveSeat

local WHEEL_RADIUS = 2.6 / 2

local SOUND_MIN_SPEED = 0.6
local SOUND_MAX_SPEED = 1.5
local SOUND_MAX_VELOCITY = MAX_SPEED * WHEEL_RADIUS

local chassis = script.Parent.Chassis
local sound = chassis:FindFirstChild("EngineSound")

local rightMotor = car.RightMotor
local leftMotor = car.LeftMotor

local rightServo = car.RightServo
local leftServo = car.LeftServo

if sound then
	driveSeat:GetPropertyChangedSignal("Occupant"):Connect(function()
		if driveSeat.Occupant then
			sound:Play()
		else
			sound:Stop()
		end
	end)

	runService.Heartbeat:Connect(function()
		local speed = math.abs(chassis.CFrame.LookVector:Dot(chassis.AssemblyLinearVelocity))

		sound.PlaybackSpeed = SOUND_MIN_SPEED + (SOUND_MAX_SPEED - SOUND_MIN_SPEED) * math.min(speed / SOUND_MAX_VELOCITY, 1)
	end)
end

driveSeat.Changed:Connect(function(property)
	if property == "ThrottleFloat" then
		leftMotor.AngularVelocity = MAX_SPEED * driveSeat.ThrottleFloat
		rightMotor.AngularVelocity = MAX_SPEED * driveSeat.ThrottleFloat
	elseif property == "SteerFloat" then
		leftServo.TargetAngle = MAX_STEER * driveSeat.SteerFloat
		rightServo.TargetAngle = MAX_STEER * driveSeat.SteerFloat
	end
end)

Any help would be needed

1 Like

I would recommend lerping CFrames since physics can be worse in terms of performance.

Cars are more-or-so a 2020 thing. Back then people used to use hinges and spring constraints for the suspension. You can try using that if you want.

Im using a A-Chassis or Chassis system for my car, so I dont know if adding suspension would be needed since its a simple form of car, could you explain to me about “lerping CFrames”?

Lerping CFrames simply means not using the roblox mover constraints and instead just moving the car by a CFrame.

-- Example
while driveseat.Throttlefloat == -1 do
car.CFrame *= CFrame.new(1,0,0)
task.wait(.1)
end

i figured out that by changing the Density values on the paint of my car and making everything else massless (besides the wheels) works really well, not my car is quick at accelerating