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?