1.) add a timer called "MouseTimer" to your game.
2.) set a wait time for "MouseTimer" (5 secs), override that in code
3.) set the "MouseTimer" to "one shot"
4.) connect the "MouseTimer" "timeout()" signal to your game script
5.) create an animation for Node (I assumed Player) called "MouseTimer"
6.) add code to play that animation in "timeout()" signal in game script
(See code below)
if InputEventMouseButton: # Triggers on any mouse button
$MouseTimer.wait_time = 2 # Override wait time (in Secs)
$MouseTimer.start() # Start Timer
#print("MouseTimer Finished") # testing mouse timer
$Player/AnimationPlayer.current_animation = "MouseTimer" # set current animation
If you want a use a specific mouse button, just add code after if InputEventMouseButton: Oh and I am assuming you are using Godot3
Hope this helps :-)