7 June 2016 Last updated at 19:29 BST
Firefighters pumped water out of several properties in Penicuik and the council said work was ongoing to clear water at Mauricewood Primary School in the town.
The Met Office has issued a yellow 'be aware' weather warning covering a band up the middle of Scotland from the Borders to the Highlands.
Heavy rain has caused travel problems, flooding a number of routes in the Scottish Borders.