Primary constructor body is not allowed

I have no idea whats wrong…

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

public class ST : MonoBehaviour {
	
{GameObject.Find(" (91)");
                        foreach (Transform child in A3.transform);  {
                             child.gameObject.SetActive(true);
 				} 	
		}
}

thanks in advance

Hey there,

your problem is that you did not add any function to your class.

For example your code is more likely to work if you put it like this:

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class ST : MonoBehaviour {
 public Transform A3;
 public void Start()
         {
                  A3 = GameObject.Find(" (91)");
                  foreach (Transform child in A3.transform);  {
                              child.gameObject.SetActive(true);
                  }     
         }
 }

though i’ll advise you here at this point that you probably look into some basic scripting tutorials. Unity provides a whole lot of them with videos and example Objects as well as Scenes. Just search for it on their website.