During a D&D campaign, we were fighting a Mummy Lord. It’s vulnerable to fire, so I used Fireball against it. It succeeded on the saving throw to halve the damage. Would it just take whatever damage I rolled, or would what I rolled be halved?
There would be rounding errors. Player's Handbook page 7 tells you to always round down. Thus, if you rolled 7 and the Mummy Lord succeeded at the saving throw to halve damage, it would be halved to 3. Then, this 3 would be doubled due to vulnerability, for a total of 6 damage.
Many DMs I know would just rule that halved, then doubled means it just stays unchanged, but strict RAW it is only true for even values. Odd values are lowered by one in that process.
As a side note, scorching ray doesn't seem to allow a saving throw for half damage. It only requires the attack roll for each ray to hit in order for a ray to do its damage.
Technically the damage you rolled would be halved from the saving throw and then doubled from the vulnerability
The fireball spell states:
[...] Each creature in a 20-foot-radius sphere centered on that point must make a Dexterity saving throw. A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one [...]
The saving throw represents whether the Mummy Lord takes the full force of the spell or manages to avoid some of itm Thus the Mummy Lord has evaded some of the damage, and will now only be taking half. However, this all happens before resistance and vulnerability apply.
The section on "Damage Resistance and Vulnerability" states:
[...] If a creature or an object has vulnerability to a damage type, damage of that type is doubled against it [...]
This tells us that we would now double the damage we just halved from the saving throw success. You could simply have the Mummy Lord take the damage you actually rolled but this would be slightly incorrect 50% of the time.
Imagine the fireball dealt 33 damage, this would half to 16 due to rounding down and then double to 32, different from the initial roll. This happens with any odd numbered damage roll. Though the whole halving then doubling thing is merely the strict RAW, many GMs would simply not modify the damage at all.