Dice are of course used as randomisers in most roleplaying games. Rolling poorly is a bit disappointing, but it's more than made up for by those times when you are (literally) on a roll and everything goes perfectly.
Even though many gamers think their games would be perfect if they only ever rolled good dice rolls, the fact that you sometimes fail is what really adds the excitement and fun to proceedings. Success in the face of uncertainty is more satisfying than a forgone conclusion.
Transcript
Qui-Gon: We jump! I roll a 13.
Jar Jar: Mesa can't jump!
GM: Oh, the tree thing...
Qui-Gon: Sally, remember that we're just playing make-believe. Even if you can't jump, Jar Jar can. You just have to roll the dice, and Jar Jar can make the jump safely.
[SFX]: Whooom! {Qui-Gon fight the droids}
Jar Jar: Okay... <roll>
Obi-Wan: Uh oh...
GM: What?
Obi-Wan: That's a 2.
Jar Jar: No, mesa change mesa mind. Mesa doesn't jump.
GM: You've already jumped.
Jar Jar: No, mesa holding on!
GM: It's too late, you rolled the dice.
Jar Jar: Why do we need dice? I don't need them to play make-believe!
[SFX]: Krtzang! {Qui-Gon and Obi-Wan are both in combat with the droids}
GM: Dice rolls are important. They make things risky. It wouldn't be fun without any risk, would it?
[SFX]: Krtzssh! Ktzunch!
Jar Jar: You just roll dice because you can't think of anything good to make up!
[SFX]: Kzarzsh! Krzwoom!
Qui-Gon: Did you see that?! I rolled a 19 and got a critical hit, and then I rolled 25 damage! I'm writing this down!
GM: Sally, just between you and me? Look at Jim's face. Do you want to take that away from him?
Jar Jar: Ooooh.