The magic ingredient in a chocolate dip cone

What makes the dip in a chocolate dip cone harden from a goo into a crispy shell? It's coconut oil.