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.
Step 2: Set up four moulding, then pour the molten sugar.
The picture shows only one tube, but there should be a as many as you can fit, or as many as you need for your batch of sugar.
The sugar is molten slowly and carefully in the pot. It turns brown real quick, so take it easy. (This part, your granny can show you.)
Pour it into all the tubes. Thanks to the high viscosity, this is easier than one might expect.