That’s saying that, starting from the node that’s associated with the above script, get it’s parent, and then get a child of that parent named AudioStreamPlayer. So, effectively, that means that the AudioStreamPlayer node you’re trying to access would be a siblling of the node running the above script. That’s apparently not the case, so the result is null.
If that doesn’t help you solve the problem, we’ll need to know how your scene tree is organized, and which node has the above script.
when I remove the volume-db = -20 it works
givenmnisi6 | 2023-06-10 19:11
Yeah, it would. The result of the get_node() call is null. There’s nothing technically “wrong” with that until you use it to try and reference something associated with the expected object. In this case, that’s the volume_db property.
So, again, that get_node() call is failing because your scene tree isn’t organized in a way that matches your code.