creating random objects at specific points

I want to randomly spawn different objects at certain points. However, I get an error in the instantiate part. How should I do it?[166720-ekran-alıntısı.png|166720]

You are almost fine with this script, you may have already fixed it:

  • myobjects is an array, you can’t pass it as Instantiate() parameter, you need to pass a single gameobject such as you did for spawnPos.

  • spawnPos is already an array of Transform

         Instantiate(myobjects[0], spawnPos[spawn].position, Quaternion.identity);
    

thanks for help