Did you make this game on godot ?
Yes!
And how did you attach the sound to the weapon ?
When the bullet is created (on func _ready)), when I shoot the gun, I spawn as child a separate node. This separate node plays the sound when it is created (on func _ready) and when the sound is finished this node itself is destroyed.
Thank you Blogadora for your help