Tring to build a sound activated servo but code won't work

Are you giving the servo enough time to finish moving? delay(50) is 1/20th of a second.