Limit part's rotation

Is it possible to limit the rotation of a part that you push and if so how would I do that.