How would i make a block for my lightsaber using raycasts

So it would only be able to hit from the back and not the front. How would i do this? Would i need a part?
All i know is raycasts is the best way to go.

Why not just create the laser beam part manually?

I already have the lightsaber im just trying to make a block rn.

Heres an example. You would the player from the front in a radius and it would do nothing but if you went to the back of the player it would dmg them.

You could use collision groups, and make the lightsaber collide with that one specific part.

Man ive already tried that first thing i did sadly it didnt work. so thats why i was looking at raycasting.

Just send a raycast from your torso, to the person it hits torso, check for non-player collisions, if there is one, zero damage, otherwise do the dmg.

This reply will help you with the front/back blocking
: How to make a sword blocking system but when you hit the back of the player blocking it still deals damage? - #2 by Tidyen