Bezier Curve Model Project Errors

    if #game.Selection:Get() >= 3 then
        local selection = game.Selection:Get()
        local NewBezier =[1], selection[2], selection[3],selection[4],selection[5],selection[6])

        local newmodel ="Model",game.Workspace)
        local Lines = {}
        local NumPoints = tonumber(GUI.Amount.Text)
        for i = 1, NumPoints - 1 do
            local TargetPart = game.ServerStorage.Road:Clone()
            TargetPart.Parent = newmodel
            TargetPart.Anchored = true
            table.insert(Lines, TargetPart)
            for i = 1, #Lines do
                local t = (i - 1) / (#Lines - 1)
                local position = NewBezier:CalculatePositionAt(t)
                local derivative = NewBezier:CalculateDerivativeAt(t)
                local line = Lines[i]
                --local p1, p2 = Lines[i].Position
                --line.Size =, line.Size.Y, (p2 - p1).Magnitude)
                Lines[i].CFrame =, position + derivative)
        --[[for i = 1, #Lines do
            local line = Lines[i]
            local p1, p2 = Lines[i].Position, Lines[i + 1].Position
            --line.Size =, line.Size.Y, (p2 - p1).Magnitude)
            line.CFrame = * (p1 + p2), p2)

This script is for a plugin that takes the six parts you have selected and creates a bezier curve out of it. It then projects a Road Model across this bezier curve. The problem is as shown in the picture, the road gets offset a bit. Me and my friend have been trying for a long time to fix this, referring to Stravant’s resizealign plugin, but we want to implement it into the plugin and are unsure how to attack this problem.

Here is the bezier curve module we are using in the NewBezier module: Bhristt's Bezier Curve Module (Tween support)

Any ideas how to implement code to align them?