Creating Acceleration for car in the correct way?

Alright, So I got 2 cars, One is a working car that can accelerate and is overall pretty well scripted. But it has it’s problems of course. Wheel feel woobly and wanky and the car isnt driving smooth overall and it doesnt got the raycasting thing where the wheels go up and down which makes everthing look very smooth. So I wanted to try to add acceleration to the smoother car ( I’ll link it for you down here ) but I wont get it working.
Here is the car that I want to accelerate (both forwards and backwards ( I dont wan’t it to go backwards the same speed as forward u know?)) : https://www.roblox.com/library/3329618016/Sports-Car

i tried this code sample in the heartbeat function but hm, nothing rly changed.

Speed = csv.Value
	--Throttle
	if seat.Throttle == 1 then
		if Speed < MaxSpeed then
			if Speed < 0 then
				Speed = Speed + Accel * 3
			else
				Speed = Speed + Accel		
			end			
		else
			Speed = MaxSpeed 		
		end					
	elseif seat.Throttle == -1 then
		if Speed > -MaxSpeed / 3.5 then
			Speed = Speed - 0.4
		else
			Speed = MaxSpeed / -3.5		
		end						
	else	
		if seat.Occupant == nil and Speed > 0 then
			Speed = Speed - Accel * 2
			--[[
			if Speed < 0 then
				Speed = 0
			end]]
		end
		if Speed > 0 then
			Speed = Speed - Accel
		else	
			Speed = 0
		end								
	end
	
	csv.Value = Speed
1 Like

This is a car that me, and @nooneisback made. Why are you linking to this car? Plus if you need help fixing up a car that we made then why not DM one of us? Instead of linking to that car then why not link people to a car that you made instead?

2 Likes

DM @DragRacer31 over me though, it’s almost 5 AM and I am working on a large project so I am mostly online only to post a few things and write down the code I done.

Also, that’s his version based on an old attempt, so I don’t remember the details.

1 Like