Hello all, can someone help me with making an on/off button -->>

I’m trying to create an on/off button using only one button (instead of 2 separate buttons); meaning when the user presses the button when the music is on, the music turns off & vice versa…

is there a code/coding that will enable me to perform this task?

I thank everyone for all their help :slight_smile:

piece a cake! Use [this] tute for the music play&stop actions and the followong code to mkae it a toggle button!

on(release) {
if(!music) {
<music play actions>
} else {
<music stop actions>
}