olokolo96 Hi, im making platformer game where you pick up things. I wanted to add sound effect for picking up coin but it doesnt seem to work, so ive tryied it on another object and it works. When picking up coin i can hear some quiet noise.
olokolo96 No, im using AudioStreamPlayer2d. Thats confusing because on other objects it works properly. code for pick up funcion of coin : func pick_up(): $Sprite.self_modulate.a -= .075 if $Sprite.self_modulate.a <= 0: queue_free() $weed.play() position.y -= 1
olokolo96 @olokolo96 said: No, im using AudioStreamPlayer2d. Thats confusing because on other objects it works properly. code for pick up funcion of coin : func pick_up(): $Sprite.self_modulate.a -= .075 if $Sprite.self_modulate.a <= 0: queue_free() $weed.play() position.y -= 1 weed is my sound node xD
olokolo96 I've realized what is cause of this. The sound just wasn have time to play bevore the parent node was deleted.