Question for Muslims

If a Muslim borrows some money and dies, are his children obliged to repay?

Please correct me if I am wrong…

If the dead person has left behind enough money, then it has to be repaid. If the debt is not more than 2/3rd the amount of the legacy, it has to be repaid.