So I’ve always seen that in wills, people assign their assets to a loved one or even to institutions they like (some church, some research institute, etc.). In these many of thes e cases, the people named in the will may not have expressly agreed to being named in the will.
Can debt be willed this way? Like all my debt now belongs person X or institute Y?
Like what if everyone just wrote, my student debt belongs to J.K Rowling in their will?


Also after all the other replies, if you leave me your mansion but still owe a million on it I would have to come up with that money to take ownership of it most likely.
Maybe a better example is if you had a paid off house you left me but you racked up credit card debt they could force the sale of the house to cover the debt and give me the remaining funds.