on/off Button for Background music

I’m having a little trouble with this.
The coding makes sense to me but it doesn’t work.
If I cut the Second Sub Condition the music will turn off and the animation will change.
But I can not turn the music back on.

The button has two animations, #0 “play”, #1 “stop”

Where am I going wrong? How can I make it work?

Thanks again everybody!

It won’t fix the problem, but if the music is synced with the button animation you just have to check one of the properties, the button animation or if the music is playing/stopped.

Now, to fix it you have two options, an “else” variable:
MusicButton1.png

Or use this trick to switch from animation 0 to 1 in a single action, then sync the music:

3 Likes

Thank you again Lizard-13! You rock!

2nd way… cool one !