The stuff you need is shown in the picture.
Note that the melt glue gun should be dedicated to this task. It should be brand new, or possibly only loaded with sugar before. Do not count on being able to clean it, neither before or after this exercise.
Step 1: Make glue stick moulds
The foil is folded once to make the tube opening stiffer, then rolled over one of the original melt glue stics.
Twist the bottom shut, tape the top, carefully withdraw the melt glue stick. If the tube collapses since the air did not have time to come in and replace the stick, gently push the sides to shape between your fingers.
Make a number of tubes. You will not be able to re-use them, and they have to hold all of the sugar that you melt.