Why can't i get the equivelant of "VehichleSeat.Throttle" from Velocity.Unit(LookVector)?

I am trying to make a snippet of code which will de-accelerate a car if there’s no DriveSeat.Throttle
However, The following way to determine direction, returns 0 always.

Direction = math.floor(Chassis.Throttle.Velocity.Unit:Dot(Chassis.CFrame.LookVector))

It does not de-accelerate the car at all, Here’s the rest of my code:

--[[ After that, Throttle and Steer | Made by InternallyAmplified ]]--
		local MaxSpeed = Car.Config.MaxSpeed.Value
		
		--Update Alpha if it's zero
		if DriveSeat.Throttle == 0 and Chassis.Throttle.Velocity.Magnitude ~= 0 then
			Direction = math.floor(Chassis.Throttle.Velocity.Unit:Dot(Chassis.CFrame.LookVector))
			
			Alpha = math.clamp(Alpha - (step * Direction),-5,5)
			
			if Alpha ~= 0 then
				if -0.05 < Alpha and Alpha < 0.05 then
					Alpha = 0
				end
				
			end
			
		else
		Alpha = math.clamp(Alpha + (step * Direction),-5,5)	
		end
		
		local y = (math.atan(Alpha) * 3.5) / 5
		
		local Vel = math.clamp(y * MaxSpeed, -Car.Config.MinimumSpeed.Value, MaxSpeed)
		
		Chassis.Throttle.Velocity = Chassis.CFrame.LookVector * -Vel * Vector3.new(1,0,1)

This has been fixed, Basically it was an issue with the math.floor, it rounded to the nearest integer, So what i’ve done instead is added a +0.5 add the end to ensure it was always rounding to either 1 or -1

Direction = math.ceil(Chassis.Throttle.Velocity.Unit:Dot(-Chassis.CFrame.LookVector) - 0.5)

(I’ve used math.ceil, but it also works with math.floor, just switch the - 0.5 to + 0.5)