Ok, I used that "colliderect" which is way easier, but it still kills them from a far. As soon as i move and my weapon spawns in, they start taking damage. I first I was thinking maybe i set it to when the players sword collides with the player, it deals damage to the enemy, but i looked again and it wasn't mixed up. I couldn't find out what was wrong with it so i'm back.
Te code is in github
Te code is in github