Here's the thing about traps. They're the ONLY encounter in an RPG that players cannot opt out of. Once you encounter a trap, whether your character is physically trapped or you're just being blocked from progressing the story by a really hard puzzle, you basically have no choice but to deal with the trap. Contrast that with encountering, for instance, a dragon. It's the most fearsome monster in the game, but if you don't feel like fighting it, you can just run. Traps are frustrating. And frustration cancels out even the thrill of victory. All you remember after being stumped by a trap is that you were stumped for a lot longer than you'd have liked.
But I really lke traps, and I use them in my games. I've never had any complaints about them from players, and in fact I usually get positive feedback about them. Here's five ways to make traps fun in your RPG.
Because traps often involve the threat of damage, I think most of us equate them to a form of passive combat. That's not how I see traps, though. I treat a trap like an NPC encounter.
When players meet an NPC, there's no right or wrong way to interact. There's probably an optimal way, but players can do whatever they want. Certainly, players are rarely stuck in an NPC encounter because they haven't said some special phrase to release them from that encounter. Players mostly remain in control of the situation, which is pointedly not frustrating.
Imagine a trap as an NPC, though. What kind of conversation would this trap NPC have with a player character? The trap isn't actually going to talk (unless you want it to), but as the Game Master you can "talk" for it, and you can reveal information about it the same way you would reveal plot or lore in a conversation with an NPC.
Engage your players with descriptions of how the trap works. That'll probably give away how to decommission it, but that's the point of the encounter, just like the point of a typical NPC encounter is to reveal hints about how to "solve" the plot. If you don't give the players the information, then the game stops.
Just like an NPC encounter, you don't have to give literally everything away about the trap all at once. This is a literal conversation between the players and the Game Master, so talk it out. Bounce ideas off of one another. Collaborate. Not everything has to happen in-world. The trap encounter, just like any encounter, can pause the game and make room for table talk. Once everyone feels confident that they understand how the trap works and they've devised their plan on how to defeat it, un-pause the game and see what happens.
In my super-simple RPG Havoc, traps deal damage automatically. Not all systems exactly allow for that, because there might be a rule for a saving throw or something like that, and it doesn't make sense for all traps to deal damage right away (a puzzle, for instance, might deal no damage at all, or it might only deal damage when a proposed solution is incorrect).
When it makes sense, though, I find that a few points of auto damage has two advantages.
One, it broadcasts to players that a threat has been encountered and that they need to stop and really talk about what they do next. It's a little like rolling initiative in combat. It's a meta game moment, where mechanics emerge from the game world, and players have to switch their brains into a different mode.
Secondly, and most importantly I think, it makes players genuinely happy about foiling a trap. I don't know if there's anything less exciting than encountering a trap, disarming it, and moving on. Why even mention the trap? Sure, it's a valid game moment, it just doesn't feel like one. Dice might be rolled, successes might occur, but it doesn't feel particularly good because there was never actually a threat.
In an imaginary world, a threat is really only felt when it actually affects your physical character sheet. Take a hit point or two or ten, and defeating that trap suddenly feels really good, because it's better to lose 10 HP than 70.
As a Game Master, have a failsafe solution that'll obviate the trap or puzzle, just in case players get really really stuck. The failsafe has to be bigger and badder than the trap so it feels good to players that they overcame that threat instead of the trap. Your failsafe could be a sudden cave-in, or a tidal wave that carries players right over the trap, or a sudden malfunction of the trap that renders it useless but exposes a magical force that was controlling it, a portal to a different section of the dungeon, a hacker NPC who intrudes upon the player character's world and wants a favour in return, or whatever.
You might even consider giving your players a safeword. It doesn't have to be meta. It can be in-world. Ruby slippers, tap three times and a trap is disabled.
So why bother having a trap? Well, because it's an opportunity for players to signal that they'd rather have an encounter they find enjoyable. If your players prefer combat, then getting past the trap leads to combat. If your players prefer conversations with wacky characters, then getting past the trap leads to an actual NPC encounter. The trap isn't serving its function as a trap, but it's adding to the atmosphere of the game world, and it's helping players broadcast to the Game Master what they'd rather do instead of encountering a trap.
They say the key to running a successful murder mystery game is to let the players decide who's guilty. In other words, as the Game Master, you just set the stage, and then watch as the players create the logic that generates the guilty party. Of course, you're obligated to throw in elements of doubt and maybe a red herring or two, but in the end the players decide how the story ends.
Traps are the same.
I adhere strictly to game rules. Heck I roll all my dice in the open, not behind a GM screen. But when it comes to traps, I usually only bother setting the stage. I describe the trap, I answer questions, I brainstorm with players if they need help. But in the end, the solution players invent is the solution that disarms the trap.
I sometimes take exception to this when the trap is an obvious puzzle, like a logic puzzle. But I only run puzzles with players who I know enjoy puzzles, and even then I always have a failsafe.
Don't let traps bring your game to a halt. Use traps as a conversation piece, or as a way for characters to get themselves into different kinds of the trouble they find most fun. The book d100 OSR Traps has a bunch of traps for your game. Some are simple, some are complex, but all of them are intended as conversation starters. They're designed to get the table talking, to stimulate creativity, and to provide diversity to the kinds of challenges your game world presents.