Yes, If you make an intention on behalf of the alive, it will be accepted by Allah’s permission.