This script has been working extremely well in my workflows but now I am looking to expand on it a little more. I am looking to close all gaps in the line. For example, in the screenshot Xander provided above I am looking to close the gap between the light blue and orange points. In this example, the gap in the line would be included with the orange points. I have been trying a few different things but am still unable to figure this out. The following screenshot better explains this. Any assistance would be greatly appreciated. Thanks again!