ArgumentOutOfRangeException: Argument is out of range.

Dear forum,
I know this may seem like a question that is asked all the time, but mine is a little different,
Normally this error occurs when there is a for loop, but I couldn’t use a for loop because of the requirements I needed. Therefore I created my own for loop. Ive tried over and over again to find a way to fix the error but no luck… Can anyone show me either what the error is or what the best way of turning my manual for loop into a normal for loop

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

public class GhostPlayer : MonoBehaviour {
	
	public List<Vector2> playerMove;
	public List<float> timedMove;
	public List<float> animX;
	public List<float> animY;
	public List<bool> isGrounded;
	public List<bool> wallTouch;

	public GameObject MySprite;
	
	Vector3 MySpriteScale;

	MovementScript original;

	float startTime;
	float journeyLength;

	Animator animations;
	
	public int numberOfMoves = 0;

	void Start () { 
		var go = GameObject.FindGameObjectWithTag ("Player"); 
		original = go.GetComponent<MovementScript> ();

		MySpriteScale = MySprite.transform.localScale;

		animations = MySprite.GetComponent<Animator> ();

		playerMove = new List<Vector2>(original.playerPos);
		timedMove = new List<float> (original.timedPos);
		animX = new List<float> (original.animX);
		animY = new List<float> (original.animY);
		isGrounded = new List<bool> (original.isGrounded);
		wallTouch = new List<bool> (original.wallTouch);

		startTime = timedMove [0];

		original.playerPos.Clear ();
		original.timedPos.Clear ();
		original.animX.Clear ();
		original.animY.Clear ();
		original.isGrounded.Clear ();
		original.wallTouch.Clear ();
	}
	
	void Update() {
		journeyLength = Vector3.Distance(transform.position, playerMove [numberOfMoves+1]);
		float distCovered = (timedMove [numberOfMoves+1] - startTime);
		float fracJourney = distCovered / journeyLength;
		transform.position = Vector3.Lerp(transform.position, playerMove [numberOfMoves+1], fracJourney);
		
		animations.SetBool ("Grounded", isGrounded [numberOfMoves + 1]);
		animations.SetBool ("Walled", wallTouch [numberOfMoves + 1]);
		animations.SetFloat ("HorizontalSpeed", animX[numberOfMoves+1]);
		animations.SetFloat ("VerticalSpeed", animY[numberOfMoves+1]);
		
		if (transform.position.x == playerMove [numberOfMoves+1].x && transform.position.y == playerMove [numberOfMoves+1].y) {
			numberOfMoves++;
		}
		
		if(transform.position.x < playerMove [numberOfMoves+1].x) {
			MySprite.transform.localScale = MySpriteScale;
		} else if(transform.position.x > playerMove [numberOfMoves+1].x) {
			MySprite.transform.localScale = new Vector3(-MySpriteScale.x,MySpriteScale.y,MySpriteScale.z);
		}

		if(original.deadNinja) {
			original.deadNinja = false;
		}
	}
}

Yea, numberOfMoves is being incremented and is being used to access playerMove, but it’s not checking if the index is valid. Maybe replace the direct accesses to playerMove with a Get function. As a test, you can try:

 //playerMove [numberOfMoves+1].x
 GetPlayerMove(numberOfMoves+1).x  

	Vector2 GetPlayerMove(int index)
	{
		if (index < playerMove.Count)
		{
			return playerMove[index];
		}
		else
		{
		     Debug.LogError("Error while trying to access playerMove 

GetPlayerMove index = " + index + "
playerMove.Count = " + playerMove.Count);
}
return Vector2.zero;
}