How do I make a non projectile weapon?

I recently returned to a game I was making and I never made a shooting system. It’s a 2D platformer. How do I make a non projectile weapon as it does not shoot anything in specific?

I assume you’re talking about a lazer weapon?
Perhaps you could try line traces and then check the hit result’s position to player’s position vector length for range on wether to apply damage or not?

Sorta like that but I need to know some blueprint to make a hit detection weapon