Sometimes you'll set up an easy-to-find and easy-to-avoid trap somewhere, just so the PCs can find it and avoid it and get some clues as to the nature of the adventure they are about to embark on.
When the inevitable happens it's good to have a backup plan.
Transcript
Guard: You should be careful, Senator Amidala. There are rumours of an attempt on your life.
Padmé: Got it. R2, search for traps.
R2-D2: Yes, ma'am.
Padmé: I walk confidently down the boarding ramp. It's the last thing they'll expect.
Padmé: So, does anyone know a bar where we can buy some weap—
[SFX]: KABOOOM!
Padmé: What was that?
Captain Typho: It was a trap!
R2-D2: Oh, traps? I thought you asked me to search for schnapps. I thought you wanted to make a cocktail or something.
GM: ... Okay, Padmé's decoy was fatally injured in the explosion. I'd prefer you to at least make it off the landing platform alive.
R2-D2: That'd be a change.
GM: Are you still annoyed about—
R2-D2: Drop it.
Padmé: Can I buy a few more of these Schrödinger decoys?