Hi Andy,
I've seen your post in the Introduce Yourself thread, and notice that you say you are new to fishkeeping. Just so we don't miss anything, I'm going to ask you some questions, and if you could answer them it will help.
How big is the tank?
How long has it been set up?
How did you set it up - let it run a few days then get fish, or do a fishless cycle using ammonia/fishfood?
Do you know the readings for ammonia and nitrite in your tank?
Did the fish show any signs of being sick before they die eg spots, ragged fins etc?
Have you only had one male swordtail at a time?
What kind and how many other fish do you have besides the female swordtails?
I do have reasons for asking
Swordtails grow quite big and need a fairly large tank, and male swordtails can be pretty nasty towards each other, so unless the tank is huge, only one male should be kept.
A lot of shops tell you to let the tank run a few days then get fish, often selling you a bottled bacteria product to add. They don't usually bother to tell you that those bottles of bacteria commonly don't work and that you need to do water changes, a lot of them, to keep your fish healthy.
If the tank is very new and if you didn't 'cycle' it for several weeks using ammonia or fish food, you will have ammonia and nitrite in the water which will harm the fish, unless you have been doing very frequent water changes to keep them low. Some fish are more susceptible to high levels of ammonia and nitrite than others.
You may have other fish which don't get on with swordtails - and as the males are a lot more aggressive than females it could lead to fights.
The fish could have been sick when you got them. Any signs on their bodies would help ID a disease, though there are some that don't show external signs.
If you can give as much info as possible, it will be a great help.