Why isn't my 2d character detecting collisions from a sword when standing still?

So when i attack another character with my sword, it isn’t detecting collision, it just goes through it, i don’t know why this is happening. Can someone please tell me how to fix it? Thanks!

Most likely this is due to incorrect collision channels. Check what channels your character is set to block and see what channels your sword traces for and/or blocks. For more information on collision, this page may help: Collision | Unreal Engine Documentation

i have set the sword and my character to custom and i block all for now, the collision is working fine when the other 2d character i want to hit is moving. when that character is standing still, the character wont detect the collision.

i fixed it by making the Y scale of the sword verry big, somehow this fixed it