Do metals donate or accept electrons?
In ionic molecules, the metal acts as the positive ion or cation.
In order to take on a positive charge the atom must give away electron. Metals donate electrons.
This would make Magnesium have 12 protons and 10 electrons making it have a +2 charge.