If try #1 was bad, poor sanitation is the most likely culprit, but other suspects include too-old ingredients, especially kit yeast if stored at room temps, wildly swinging temps for fermentation, or temps so high they develop off-flavours or so low fermentation is extremely slow.
If you don't know how the kit has been stored, buy a separate yeast, one suited to your expected temps. On temperature I'd need more information. If your setup is just a fermenter in a closet, keep in mind that the temp will rise a lot during the active stage of fermentation. After that you can insulate with blankets or towels to reduce variation.