Ranged traps require ammo. Can get expensive. They also have to be placed well and protected for maximum effectiveness.
Melee traps only have to be repaired, so they are cheaper. Placement is also key, but they tend to break down more from use than direct attacks.