Help with code that is not working correctly

nevermind everybody fixed it, used previous suggestion of adding a delay, added a 1500ms delay after writing the servo position!