help erro ArgumentOutOfRangeException: Argument is out of range. Parameter name: index

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.GameObject].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
piscaalerta2+c__Iterator16.MoveNext () (at Assets/projeto bus/Content/Scenes/piscaalerta2.cs:26)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
piscaalerta2:Update() (at Assets/projeto bus/Content/Scenes/piscaalerta2.cs:19)

script:

//Script Made By ErikMartins//
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
public class piscaalerta2 : MonoBehaviour
{

    public List <GameObject> SetaDireita = new List<GameObject> ();
    private int SetaDireitaUpgradeSelected = 0;

    void Start() {

    }
       
           
            void Update() {
        if (Input.GetKeyDown (KeyCode.X)) {
            StartCoroutine (ProcessarPara1 ());
        }
    }
       
    IEnumerator ProcessarPara1 (){
            //--------------------------------------------------inicio pisca alerta-----------------------
        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = true; 
            yield return new WaitForSeconds(0.1f);

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = false; 
            yield return new WaitForSeconds(0.2f);

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = true; 
            yield return new WaitForSeconds(0.3f);

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = false; 
            yield return new WaitForSeconds(0.4f);

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = true; 
            yield return new WaitForSeconds(0.5f);

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = false; 
            yield return new WaitForSeconds(0.6f);

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = true; 
            yield return new WaitForSeconds(0.7f); 

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = false; 
            yield return new WaitForSeconds(0.8f); 

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = true; 
            yield return new WaitForSeconds(0.9f); 

        SetaDireitaUpgradeSelected--;
        SetaDireita[SetaDireitaUpgradeSelected].active = false; 
            yield return new WaitForSeconds(0.10f);

            //--------------------------------------------------Fim do pisca alerta-----------------------
        }
    }

You set Your variable to 0 and then You reduce it by 1 so it ends up at -1 when You pass it to List. Lists do not have negative keys. So instead:

SetaDireitaUpgradeSelected--;

You need:

SetaDireitaUpgradeSelected++;

Or if You want go through list in reverse You need to set Your variable to maximum key that list have. Like so:

// -1 at the end because Keys in a list start at 0
private int SetaDireitaUpgradeSelected = SetaDireita.Count - 1

Still not working do you have any other idea what it might be?

The strange one and that the script was good from scratch several started to give this problem …