while script.Parent~=nil do getInputValues()local b=Chassis.GetAverageVelocity()local W=script.Steering.Value Chassis.UpdateSteering(W,b)local X=script.Throttle.Value script.AngularMotorVelocity.Value=b script.ForwardVelocity.Value=DriverSeat.CFrame.LookVector:Dot(DriverSeat.Velocity)Chassis.UpdateThrottle(b,X)if script.HandBrake.Value>0 then Chassis.EnableHandbrake()end wait()end

while script.Parent ~= nil do
	--Update throttle, steer, handbrake
	getInputValues()

	local currentVel = Chassis.GetAverageVelocity()

	local steer = script.Steering.Value
	Chassis.UpdateSteering(steer, currentVel)

	-- Taking care of throttling
	local throttle = script.Throttle.Value
	script.AngularMotorVelocity.Value = currentVel
	script.ForwardVelocity.Value = DriverSeat.CFrame.LookVector:Dot(DriverSeat.Velocity)
	Chassis.UpdateThrottle(currentVel, throttle)

	-- Taking care of handbrake
	if script.HandBrake.Value > 0 then
		Chassis.EnableHandbrake()
	end
	wait()
end
