Make sure you switch to world using the button you have assigned to "Switch to world" in your controls. To use it, hover over the npc you want to assign a house to, then press the button previously mentioned. From there, it should allow you to assign that npc to a house using your use button.