Before carrying out any repairs, you should always confirm that the repairs required are to the common parts, not areas owned exclusively by one or more individual owner.
First, check your title deeds to see if they set out requirements for maintaining the common parts and apportioning the cost of repairs and follow those. If your title deeds are silent, the rules of the Tenement Management Scheme ("TMS") contained in the Tenement (Scotland) Act 2004 will apply.
Follow the decision-making / voting process of your title deeds or the TMS to agree with your neighbours before making common repairs, unless in an emergency where separate rules apply under the TMS. In both cases, write to the neighbour afterwards requesting payment of their share of the costs. If the neighbour continuously fails to respond, you can raise a court action to recover their share.
Notice of Potential Liability of Costs
To protect your ability to recover the neighbour's share before they sell the flat, you should seek to register a Notice of Potential Liability of Costs ("Notice") against the neighbour's title.
The Notice acts as a marker to warn prospective purchasers that they would be liable with the previous owner for the cost of the common repairs when they become the new owner. It is therefore an effective tool for recovery, as it will likely result in the owner having difficulty in selling their property without it being removed, prompting them to make payment.
To be legally effective, the Notice must be registered at least 14 days before completion of the sale (so it is best to register one as soon as possible if a neighbour defaults) and will remain against the title for three years until it expires. It would need to be renewed at the end of the three years if the neighbour still had not paid.
If a Notice is not registered in time, you will not be able to claim against the new owner for the unpaid share of repairs. You will still be able to pursue the previous owner for their share of the costs, although it may be more difficult with them having moved on.