diff --git a/Assets/Scripts/HeroSpawner.cs b/Assets/Scripts/HeroSpawner.cs index e7b9fb4..3348411 100644 --- a/Assets/Scripts/HeroSpawner.cs +++ b/Assets/Scripts/HeroSpawner.cs @@ -29,7 +29,7 @@ public class HeroSpawner : MonoBehaviour int randomY; do { - randomY = Random.Range(0, numberOfYPositions - 1); + randomY = Random.Range(0, numberOfYPositions); } while(spawnedPositions[randomY]); spawnedPositions[randomY] = true;