If you are rigging the model, there's actually a button to automate that. You don't have to go bone by bone as I did. The button is right there, a little up. Press it and it will do the magic (if the model comes from mixamo, or has the same standard bones)