neb: Posting a second time to emphasise this point, the guns on movie sets are typically real guns. They're not props. The one specific problem is that, with Hollywood's love of ammo dumps from automatic weapons, blanks don't provide enough energy to cycle the action on automatic weapons.
They may have been real guns once but there are companies eg Movie Armaments Group that specialise in modifying them to appear to work as normal with various degrees of muzzle flash down to fully plugged barrels.