'this' refers to the script, not the gameobject, so you only need to put:
transform.position.z += 1;
In fact, you don't even need to put +=1 instead just use the shorthand version ++:
Is the final code, these tutorials were made quite a while ago and some of the unity api has changed since then.
pengutechMember Since 28 Dec 2012
Offline Last Active Apr 04 2013 02:57 PM