Node based car movement

I’m currently making a vehicle AI where it follows a set of nodes on a curved path. However when this code runs the y value of the car gets set to 10000000 and I dont understand why.

Code:

function Vehicle.Dismiss(Car)
	if Car then
		local CarRoot = Car.Root
		local CurrentSpeed = Car.CurrentSpeed.Value
		local CurrentNode = Car.CurrentNode.Value

		local Connection

		local function NextNode()
			local NextNode

			if tonumber(CurrentNode.Name) == nil then -- just incase the node is not a number
				NextNode = Nodes["1"]
			else
				NextNode = Nodes[tostring(CurrentNode)]
			end

			print(NextNode)
			return NextNode
		end

		if not NextNode() then
			Vehicle.Discard()
		end

		local function Move(delta)		
			local DistanceTraveled = (CurrentNode.Position - CarRoot.Position).Magnitude
			local Distance = (CurrentNode.Position - NextNode().Position).Magnitude
			local NewAlpha = ((DistanceTraveled + CurrentSpeed * delta)) / Distance

			CarRoot.CFrame = CurrentNode.CFrame:Lerp(NextNode().CFrame, NewAlpha)

			if NewAlpha >= 1 then
				CurrentNode = NextNode()
			end
		end


		task.spawn(function()
			Connection = RUNSERVICE.Heartbeat:Connect(function(delta)
				Move(delta)

				CarRoot.CFrame = CFrame.new(CarRoot.Position) * CFrame.new(CarRoot.Size.X, CarRoot.Size.Y, CarRoot.Size.Z)
				Car:SetPrimaryPartCFrame(CarRoot.CFrame * CFrame.new(0, CarRoot.Size.Y, 0))
			end)
		end)


		Car.Destroying:Connect(function()
			if Connection then
				Connection:Disconnect()
			end
		end)
	end
end