Derives from MonoBehaviour or Component or is an interface. Error

I am coding a script in which an enemy who when it finds a set of footprints will start following the footprints to find the player. It works fairly well with a few issues in the movement related only to what I can assume is the navmesh but I get this error.

ArgumentException: GetComponent requires that the requested component ‘Vector3’ derives from MonoBehaviour or Component or is an interface.

It doesn’t stop the enemy from following the footsteps and everything is still mostly functional but I still want to get rid of this bug.

Here is my code. It’s not very clean or organized or probably optimal as it is just me working on it.

void OnTriggerStay(Collider col)
	{
		//If the wolf stumbles upon any footstep trackers this gets their specific instance and sequence number.
		if (col.gameObject.CompareTag("tracking")) {
			footstepTracking thisFoot = col.GetComponent<footstepTracking>();
			if (PlayerInSight == false) {
				this.gameObject.GetComponent <NavMeshAgent> ().destination = nextFootLoc;
			}
		

			foreach (GameObject footprint in footTrack){
				footstepTracking thatFoot = footprint.GetComponent<footstepTracking>();
				Debug.Log (thatFoot.Seq);
				if (thatFoot.Seq == (thisFoot.Seq + 1)) {
					nextFootLoc = thatFoot.GetComponent<Vector3> ();
					Debug.Log ("The next footprint is" + thatFoot.Seq);
				}

Vector3 is not a component. If you need the position of a GameObject, that object and all Components attached to it have a transform field that contains the Transform of that object, so you can use thatFoot.transform.position to get the Vector3 position of the object your footstepTracking script is on.


(Deleted my previous answer as I realized it was not the best answer)

When you call GetComponent method, it requires that the component you want to get reference to is derived from: MonoBehaviour, Component or is an interface. Vector3 does not derive from any of them, because its chain of inheritence looks as follows:

UnityEngine.Vector3
System.ValueType
System.Object