Hi
This could be down to many different reasons and is difficult to diagnose remotely i would recommend you take the car to a main dealer who know these cars inside out and would be able to resolve this issue quickly.
There are no common issues on this roof for this type of fault.
I have seen many none franchised garages cause damage to these roofs.
Due to the age of this vehicle ,once the roof has been diagnosed i would ask the dealer to submit a goodwill request to BMW to see if they will cover the cost of repairs.
This reccomendation does not fix your car but may help lower the cost of repair.
Regards Steve
BMW Technician
city & guilds - Bmw Senior Technician