Scenario: player rolls to attack, rolls a 1. Next round, rolls a 1. Round after that, rolls a 1. Fourth round, rolls a 2.
This really happened today. He was going back and forth between two different dice too.
It just so happened that this whole encounter had outrageously unlikely rolls and the players seeing more low single digits than they had any right to, while the DM was rolling four d20s all at once for an area attack and getting four 20s.
At some point or another, all the role-playing in the world doesn't save you when the dice are just not in your favour. What is a DM to do in such situations where players are getting frustrated at the dice and, as a result, are getting upset with the game?
EDIT: I wanted to update the question with regard to edgerunner's answer, because the big problem I was experiencing wasn't just the bad rolls and the bad game mechanics consequences, but the bad player attitudes. Players would roll low and wouldn't be excited to role-play failure, they would just sigh and end their turn or walk away from the table. It got to a point where it was difficult to engage with the players who were rolling badly because they were disengaging with the game.
So in regards to edgerunner's answer of making an awesome story out of failure, I really like that answer and I'm going to pitch it to my group, but I want to open things up a little bit and stress the psychological disengagement that happens with bad rolls, the players who stop trying to do anything, roleplay or otherwise, when they're overcome with dice frustration. How can I help them get back into the game?
Maybe this is only a problem in certain game systems like D&D 4e (full disclosure: we were playing 4e) where many aspects of the game are heavily mechanics-driven: you use a power, you miss, your power does nothing, you "waste" your turn. A player's entire contribution to the game is predicated on the dice "allowing" them to contribute.