I have an object that makes instances , it works very well. But i would to put random rotation on created instances. This is my code for instances :
Vector3 SpawnPosition = new Vector3(0, 0, 62); // Position of the spawning point
SpawnPosition = this.transform.position + Random.onUnitSphere * RangoCreacion; // How will create objects spawn position
SpawnPosition = new Vector3(SpawnPosition.x, SpawnPosition.y, 0); // For spawning objects on axis Y and x
Copy = Instantiate(pieces[UnityEngine.Random.Range(0, 5)], SpawnPosition, Quaternion.identity); // For copying objects of rack and the position from they will begin