Unplug the power cord to help prevent shocks and damage to the dryer. Turn off the gas supply to the dryer, if so equipped.
Open the dryer door. Remove the two Phillips-head screws below the edge of the door opening. Pull out the lint trap.
Remove the three Phillips-head screws from the outlet grill on the inside. To reach the screws, place your head and arm inside the dryer tub. Pull the outlet grill free of the dryer, and unplug the two terminal connectors attached to the moisture sensor.
Remove the grill and moisture sensor. Squeeze the tab on the end of the moisture sensor with needle-nose pliers and push the sensor through the front of the grill. Lift the tabbed end of the sensor away from the grill and unhook the other end of the sensor to free it from the grill.
Hook the end of a replacement sensor into the grill. Press the tabbed end of the sensor into the slot in the grill until it snaps into place.
Place the grill inside the dryer, and connect the wires to the sensor terminals. Hold the grill in the mounting location. Install and tighten the three Phillips-head screws. Install and tighten the two Phillips-head screws below the door opening. Slide the lint trap into its holder. Plug in the dryer, and turn the gas supply on, if so equipped.