I prefer royal icing for attaching items to fondant. It can be colored easily, and doesn't set up in the piping bag like chocolate does. If you prefer to use chocolate, you can keep it in a dish on a heating pad or in water in an electric skillet or warmer on low to keep it from setting up. Because the chocolate sets up quicker, it may be a better option depending on the application and how heavy the item being attached is. Hope this helps.