Hey everyone i Made this script, but it have problem
I want to move GameObject that is attached to this script for 4 seconds up, but what it do its count to 4 than counting stops but
GameObject is still moving up… can someone help me pls ?
function Update () {
for(var n = 0; n < 5; n++)
{
transform.Translate(Vector3(0, 0.1 * Time.deltaTime ,0));
Debug.Log("n is now: " + n);
}
}