maybe the wait time is to short. Use "wait(1)" , that wait for one frame...