I keep my mollies in water at about 24C but that is not a critical parameter for common mollies. Much more important is the mineral content of your water. Common pet shop mollies need very high mineral content water. In my case, my hardness, GH, is over 10 degrees and the K of my water is also over 10 degrees with a pH of about 7.8. Pet shop mollies thrive in my tap water. The TDS, another way to measure mineral content with an electronic meter, runs about 225 ppm in my tap water. If you have typical water that people think of as being good for fish, chances are your water is much softer and lower in mineral content than my tap water. That would make your tap water great for things like cories or angels but not really very good for common pet shop mollies.
Why do I keep emphasizing common pet shop mollies? There are well over 20 species of fish with a common name that includes the word molly. Some, very few, of those fish need water that is much more suitable for things like angels and cories than my tap water. If you happen to have some of those mollies, please ignore any advice you see in this thread. If you have Limia species, they are more or less mollies that inhabit the Caribbean islands and need much the same water as mollies.
If you find that you have soft or low pH water, consider adding either some KH boosting mineral to your water as can be done using crushed shell in your filter or add sea salt to the tank. Either one will increase the mineral content of your water and will also raise the pH of your tank's water. If your problem is not the water chemistry we have already covered, check your fry tank's levels of ammonia and nitrites using a liquid type test kit, one of the ones with little test tubes. If you have detectable levels of either ammonia or nitrites, your fish are being killed by simple chemical poisons that result from normal biological processes. In that case, you can assure survival by doing frequent large, over 50%, water changes.