var explore:GameObject;
function Update()
{
explore=GameObject.FindGameObjectsWithTag("Player");
for(var i=0;i<=20;i++)
{
explore*.transform.Translate(0,0,1);*
}
}
var explore:GameObject;
function Update()
{
explore=GameObject.FindGameObjectsWithTag("Player");
for(var i=0;i<=20;i++)
{
explore*.transform.Translate(0,0,1);*
}
}
There’s no guarantee that FindGameObjectsWithTag() will find 21 items (21 because the array is zero based). If you have 20 items in the scene, then just use ‘<’. But a better way is to use ‘Length’.
for(var i=0; i < explore.Length; i++) {
explore*.transform.Translate(0,0,1);*
}