GameObject can not implicitly converted

GameObject hulk = GameObject.FindWithTag(“Hulk”);
Mc_autoRotate hulkR = hulk.GetComponents<Mc_autoRotate>();
hulkR.orotate = new Vector3(0,0,0);

This hear is my code. The Tags Hulk and all that are just random names, not actually Using Hulk. I get this as an error when running the code

Assets/Script/Easter
Eggs/Cheat.cs(55,27): error CS0029:
Cannot implicitly convert type

Mc_autoRotate[]' to Mc_autoRotate’

There are two possibilities :

  • you want every components of type “Mc_autoRotate” :

    Mc_autoRotate hulkR = hulk.GetComponents(Mc_autoRotate);

  • you want the only component of type “Mc_autoRotate” :

    Mc_autoRotate hulkR = hulk.GetComponent(Mc_autoRotate);

GetComponents

Use GetComponent with no s