In a recent gaming session the PCs were shooting a Medium-size slaver ghoul over the heads of Small-size kobold crowd (say, a dozen of them). The Ghoul was obviously an enemy but the kobolds were being forced into a fight and thus reluctant.
I gave the ghoul half cover due to being obscured by smaller creatures but I didn't know how to decide if a PC would have hit the kobold instead of the ghoul should they miss, thus provoking an attack from the no longer reluctant kobolds.
The PHB provides rules for degrees of cover providing bonuses to AC and saving throws only, not the chances to hit the cover. I could rule that if a PC misses by more than the AC bonus provided by the cover, then they hit the cover instead. However, the cover in this case, is a creature and has its own AC. Also, a PC can miss in any direction, by shooting over the ghoul, and not just too low, hitting the cover - so what, scatter diagram?
In actual fact, the PCs hit the ghoul, saving me from improvising, but I wonder how I should have resolved it should they have missed? In the answer, please state if the rules provided by you would apply to a situation where an archer shoots at an enemy engaged in melee combat with an ally (another case from the same session).
I've found a few answers to similar questions asked here but they pertain either to other games (Pathfinder or D&D 4e) or are about stealth not the chance to hit the target's cover.