so basically it should be changing its direction every 6 seconds but if I do that, the game becomes very slow. nvm, I fixed it.