There are several ways to prevent condensation on metal roofs. One is to have proper ventilation in the attic space so that warm, moist air can escape. Another is to make sure the roofing surface is properly insulated and sealed so that warm air cannot escape. A third option is to install a rooftop dehumidifier, which will draw moisture out of the air and help to keep the roofing surface dry.