Place it at the exact beat before the impact in a fail edit, then follow it with a reaction sound once the person ducks. A buzzer works for the failed attempt, while a scream fits the near miss that follows the warning.
About this sound
This is a short spoken clip of about five and a half seconds in which a voice says the French words 'baisse ta tete', telling someone to lower their head. The direct command feels urgent and playful at once, turning a simple warning into a funny cue for a duck, a dodge or a narrow escape.