I've always wondered if this was just a common movie trope or the real deal. Is there any historical backing to this popular portrayal of ancient temples?
There are several topics already that discuss this if you'd like to check them out,
According to documents about the building of the tomb of Shi Huangdi, his tomb contains crossbows with some kind of mechanism enabling them to shoot anybody who enters the tomb. However, since his tomb hasn't been opened, we can't actually confirm this yet. Of course, most components of such a trap would have rotted away LONG ago, so even if we find the bits of the trigger and firing mechanism, we'll most likely not be able to determine how the trap itself would have worked.