Accessed None/Attempted to Read Property Error when stopping sound

davidtveraas
Wed, 23 Jun 2021 05:02:00 +0000
Audio

I’m attempting to stop the playing music when a level is over, so I can then play a little victory sound effect. When I try to stop the sound before I play the victory sound, I get either an Accessed None or Attempted to Read Property error, seemingly interchangeably. (Sometimes I get one and other times I get two errors) Running the code this way does exactly what I want the game to do in play mode, but it throws this error. I previously had the Stop Sound node at the end of this line of code and it does not throw these errors there. I’m not sure why, since no value is assigned to Music (my problem component) between the beginning and end.

What am I doing wrong here?

6 posts - 1 participant