You have to let your cake cool completely before frosting. If the cake is even a little warm, the frosting will simply slide off of the cake.