private IEnumerator InstantiateDice(int diceToInstantiate) { for (int i = 0; i < diceToInstantiate; i++) { Die die = Instantiate(diePrefab, player.transform); dice.Add(die); die.AssignPlayer(player); die.transform.Translate(Vector3.up, Space.World); die.transform.rotation = Quaternion.Euler(new Vector3(Random.Range(0, 360), Random.Range(0, 360), Random.Range(0, 360))); yield return(new WaitForSeconds(.05f)); } }