home made cough sweets didn't set properly
you need a Candy thermometer. Sugar needs to be heated to the soft or hard crack temps in order to set as desired. If the sugar does reach the needed temp, then it won't do what you wanted. Hard crack makes hard candies, soft crack makes softer but firm candies.