This typically happens when the marshmallows are melted quickly over high heat or when left on the heat source too long. Melt the marshmallows low, slow and only as long as needed for the marshmallows to fully melt.