[C#]Instantiating Objects to move on a line.

I’m trying to create sphere objects that will spawn one shortly after the other, and move down a line.

Currently when trying to code this, the first sphere spawns and starts moving properly. However, the next object set to spawn 5 seconds later is instantiated at the correct start point, but then jumps and moves in unison with the first sphere. They are overlapped and it looks like just one is there but more and more clones are seen to be created in the hierarchy.

What I’m hoping to do is send a sphere down the path of a line drawn between two end points. When it gets to the other side it will be destroyed. They should be spawning in one after the other so we get a steady stream of spheres flowing down the line.

Furthermore, I’m just noticing but my sphere won’t follow the line when I move my endpoints. It simply floats along the path it determined when the object was created, even though I have the code for movement in the Update() function.
EDIT* This is actually fine, it’s more that each new sphere should follow the path of where ever the endpoint is when that sphere is created. I think this will work fine once I get the spheres spawning and moving at the correct intervals.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Movement : MonoBehaviour {

	public GameObject P1;
	public GameObject P2;

	void Start () {
		this.transform.position = P1.transform.position;
	}
	
	// Update is called once per frame
	void Update () {
		this.transform.position = Vector3.Lerp (P1.transform.position, P2.transform.position, Mathf.SmoothStep(0f,1f, Time.time/20f));

		//This line is for making the traveler ping pong back and forth between endpoints.
		//transform.position = Vector3.Lerp(P1.transform.position, P2.transform.position, Mathf.SmoothStep(0f,1f, Mathf.PingPong(Time.time/20f, 1f)) );
	}
}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Travelers : MonoBehaviour {
	
	public GameObject Traveler;


	private float Lifespan;
	private float Speed;
	// Use this for initialization
	void Start () {
		StartCoroutine(DoSomething());
	}

	void Update(){
		
		StartCoroutine(DoSomething());
	}

	void createObj () {
		Vector3 spawn = this.transform.position;
		Instantiate(Traveler, spawn, Quaternion.identity);

	}

	IEnumerator DoSomething()
	{

		while (true) {
			createObj ();
			yield return new WaitForSeconds (5);
		}

	}
}

hi;
u are doing it all wrong;

first of all a Corutine is not like a simple function to call each fram in update method;

each time u do this :

   StartCoroutine(DoSomething());

u are creating a seperate Corutine that works on its own ;
so this way u are Creating too many Objects;

so u need to remove this lane of code from update method;
its enough to be in start method and run only once;

u are changing the position in the start method and assing it to a variable that u stored again in the prefab;

so i think i need some screen shot from inspector editor of these prefabs u care instantiating;