Hello, for some reason my for loop won’t stop running. I don’t understand why, but my code is:
var Prefab : Transform;
var forValue : float;
var XPos : float;
var YPos : float;
var ZPos : float;
function Start(){
XPos = 1.829174;
YPos = -105.606;
ZPos = 1.927386;
}
function Update()
{
for (forValue = 0; forValue <= 68; forValue++) {
Debug.Log("Value of X is: " + forValue);
Instantiate(Prefab, new Vector3(XPos,YPos,ZPos), Quaternion.identity);
XPos += 1.829174;
}
}
Thank you if you know how to fix this