Foreach loop doesn't work as expected

Hey. I’m trying to get into the scripts of multiple game objects that are exactly the same. Ive set a tag for each of them. Here’s the script.

using UnityEngine;
using System.Collections;

public class AdaptiveEvent : MonoBehaviour {

	public string ScenarioBlocks;

	public ValueScript vS1;
	public ValueScript vS2;
	public ValueScript vS3;
	public GameObject Vs1;
	public GameObject Vs2;
	public GameObject Vs3;
	public ChoiceScript[] CS;
	public GameObject[] Choices;

	public float SeedValue;

	void Start()
	{
		Choices = GameObject.FindGameObjectsWithTag ("Choic");
		foreach (GameObject Choice in Choices) 
		{
			CS = Choice.GetComponents<ChoiceScript> ();
		}

		vS1 = Vs1.GetComponent<ValueScript> ();
		vS2 = Vs2.GetComponent<ValueScript> ();
		vS3 = Vs3.GetComponent<ValueScript> ();
	}

	void FixedUpdate()
	{
		SeedValue = vS1.cValueRound * vS2.cValueRound * vS3.cValueRound;
	}

	void ScenarioBuilder()
	{
		
	}

}

The expected outcome was that i’d get 4 GameObjects set (And I do) along with 4 Scripts in the Inspector. This is the part that does not happen. I’m pretty sure i’m doing this wrong, please enlighten me oh Unity Gods.

This should fix your issues. (I changed CS and Choices to be lists instead of arrays)

using UnityEngine;
using System.Collections;
using System.Collections.List;

public class AdaptiveEvent : MonoBehaviour
{

    public string ScenarioBlocks;

    public ValueScript vS1;
    public ValueScript vS2;
    public ValueScript vS3;
    public GameObject Vs1;
    public GameObject Vs2;
    public GameObject Vs3;

    public List<ChoiceScript> CS = new List<ChoiceScript>();
    public List<GameObject> Choices = new List<GameObject>();

    public float SeedValue;

    void Start()
    {
        Choices.Clear();
        Choices = new List<GameObject>(GameObject.FindGameObjectsWithTag ("Choic"));
        CS.Clear();
        for (int i = 0; i < Choice .Count; i++) 
        {
            CS.Add(Choice*.GetComponents<ChoiceScript>());*

}

vS1 = Vs1.GetComponent ();
vS2 = Vs2.GetComponent ();
vS3 = Vs3.GetComponent ();
}

void FixedUpdate()
{
SeedValue = vS1.cValueRound * vS2.cValueRound * vS3.cValueRound;
}

void ScenarioBuilder()
{

}
}
But you may want to consider going all the way like this
using UnityEngine;
using System.Collections;
using System.Collections.List;

public class AdaptiveEvent : MonoBehaviour
{

public string ScenarioBlocks;

public List valueScriptObjects = new List();
public List valueScripts = new List();

public List CS = new List();
public List Choices = new List();

public float SeedValue;

void Start()
{
Choices.Clear();
Choices = new List(GameObject.FindGameObjectsWithTag (“Choic”));
CS.Clear();
for (int i = 0; i < Choice.Count; i++)
{
CS.Add(Choice*.GetComponents());*
}

if (valueScriptObjects.Count == 3)
{
valueScripts.Clear();
for (int i = 0; i < valueScriptObjects.Count; i++)
{
valueScripts.Add(Choice*.GetComponents());*
}
}
}

void FixedUpdate()
{
if (valueScripts.Count == 3)
{
SeedValue = valueScripts[0].cValueRound * valueScripts[1].cValueRound * valueScripts[2].cValueRound;
}
}

void ScenarioBuilder()
{

}
}
FYI, your tag shows Choic and not Choice. Not certain if that was intentional.