ASDAsdASDasdqweqw3edqwdQWDEqwedQWD

QWDqwdqwd

Inside your if statement you are assigning and not comparing. Still, you cannot compare a float with 0 since a float has little chance to be exactly 0. You should either round it or then check if the value is near 0.

can you give me an example how to do that. im pretty new using unity 3d and i was wondering if array.RemoveAt(i); or its array.RemoveAt(i–); because the index needs to stay in the same place.
thank you for your swift reply

for (i = 0; i <= array.Length; i++) {

if (array*.transform.position = 0)*
array.RemoveAt(i);
**Look this code you are deleting i array.RemoveAt(i);
element after that you are calling that element,
print(“Removed element: “ + array_.name);
but that element does not exists !:)**
print(“Removed element: “ + array*.name);*
else if (array*.transform.position > 0)*
array*.transform.forward = Vector3(1,0,0);*
}_