How does melanin allow you to sunburn? I thought that

Patient: How does melanin allow you to sunburn? I thought that melanin protects your skin.

Symptoms: Sunburn

Doctor: