You probably didn't heat it to the right temperature. You can fix this by putting the fudge back into the pan with 1 cup of water on medium-low heat. Stir until the fudge dissolves, bring to a boil, and STOP stirring. Cook the fudge until it reaches 115C° (237F°), then turn off the heat and let it cool before you start beating your fudge. Once the mixture starts to lose its shine, you can pour it back into a prepared cake pan and set it in the fridge for a few hours.