Melanoma can be genetic, but it is very rare.  Melanoma comes from the sun.  Teaching your kids good habits and living them out yourself is the best way to avoid melanoma.