I am trying to turn off all components instead of one of them on a Game Object based off of which number is chosen as the index. The code is longer than this but I am trying to figure out if there is a more efficient way to doing so rather than calling so many GetComponents. When running this code I am getting a StackOverflowException and I think it is because of how many time I am calling GetComponent. The idea that I had was to put each GetComponent into an array and if the index matches the array number than make that component true and make the rest false. I that is the right direction can some help me in the right direction on how I create arrays out of scripts. I am trying to turn off all components instead