Is this program correct?

this is my problem.

my servo keeps on jettring when i place my hand in front of the SHARP IR… and when i remove my hand servo wont move to any side nd my robot would jst move forward.