depends entirely on what gun, but for m4/ak platforms you'll either be dealing with a grub screw in which case it's possible to loosen and re-tighten once aligned (some might have alignment tabs or a divet which can limit how far you can twist), or pins in which case good luck.
however the correct fix, and this works for any platform, is to get a scope mount and fit a red dot which you can zero