This is most often the case when there is too much moisture in the fudge. Be sure to use exact measurements and allow for enough time for the fudge to set in the fridge, and it should turn out just fine.