Give this lot a bell. Great folks
https://scotland.shelter.org.uk/housing_advice/renting_rights
By the looks of things it's upstairs pipes or bathroom. Phone them, as in Shelter. Not sure about when a flat becomes uninhabitable.
Hotels last resort, which most landlords will dodge.