Set Objects in array active

I have a respawn script where after a variable is set true in another script, a wait coroutine would start and the array would be set active. I keep getting the error
Assets/Scripts/Player/Respawn.cs(23,13): error CS1061: Type UnityEngine.GameObject[]' does not contain a definition for enabled’ and no extension method enabled' of type UnityEngine.GameObject’ could be found. Are you missing an assembly reference?

I looked over the internet and couldn’t find any solution to my problem.


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

public class Respawn : MonoBehaviour {

    public int Wait;

    public GameObject[] gas;
    public int currentIndex = 0;

    private static bool Touch;
	// Use this for initialization
	void Start () {

        gas = GameObject.FindGameObjectsWithTag("Gas");
	IEnumerator Respawning()
        yield return new WaitForSeconds(Wait);
        gas.enabled = true;
	// Update is called once per frame
	void Update () {
        Touch = Gas.Touched;

        if (Touch)
            foreach(GameObject _obj in gas)

well you could either make a for, or a foreach loop. you get the error because you can’t enable a GameObject. you have to set it active(like GameObject.SetActive(true)).

//foreach loop

foreach(GameObject obj in gas) {

// for loop

for(int i = 0; i < gas.Length; i++;) {