First you activate the light,
second you shoot a NPC near a chest
finaly you open the chest(You have to open the chest 1 second after shoot NPC or it doesnīt work)
The only NPC can shoot you is the one you shoot first the others dont shoot you.
I hope i help