using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BlockSpawner : MonoBehaviour
{
public Transform[] spawnPoints;
public GameObject blockprefab;
// Start is called before the first frame update
void Start()
{
int randomIndex=Random.Range(0, spawnPoints.Length);
for (int i = 0; i < spawnPoints.Length; i++);
{
if (randomIndex != i) //it says The name 'i' does not exist in the current context here and got confused
{
Instantiate(blockprefab, spawnPoints[i]); //here to
}
}
}
}
Remove the semi colon at the end of 18 ![]()
Already told you how to fix it in your other thread.
sorry was very confused
thx