ohh solved! the 48 or 10 values wasnt the mistake , that's just the time that the player will walk, the problem is that i place "var counter = 48" on top of the code as the other vars and not before the "while(counter > 0" thx laugh