It is best to use a good hammer tacker to attach foil to the roof for roofing. This leaves one hand free to hold the material, while you can use the other to fix the roofing with the hammer.
A suitable hammer tacker is, for example, the Bostitch H30-6. It is important for choosing a hammer tacker for fixing roofing that the handle is comfortable. This way you can work for hours without developing complaints.
This hammer tacker uses the STCR2619 staple. This staple is available in 3 different sizes.