To get rid of rats in your loft, you can follow these steps: 1. Identify the signs of a rat infestation, such as droppings, chew marks, and unusual sounds. 2. Choose the appropriate trap, such as snap traps or live traps, and place them in the suspected nest sites or travel routes of the rats. 3. Use peanut butter or something sweet as bait for snap traps. 4. Make changes outside your home, such as trimming tree limbs and removing water and food sources, to deter rats from entering the attic. 5. Consider professional pest control services if the infestation persists or if you are unsure how to handle it effectively.