After searching online for an answer to how to convert a toggle switch to a momentary switch I found the circuit below. I've simulated it and it works in CircuitLab.
simulate this circuit – Schematic created using CircuitLab
I'd like to do the same thing using a transistor instead of a relay but so far I haven't been able to make it work in CircuitLab. Can I convert a toggle switch to momentary switch using a transistor and capacitor?