Is it possible to have one button the toggle my ‘my_sound.setVolume();’ between 0 and 100.
I’m having a hard time getting the as correct, but here is my idea:
music_but = "on"
if music_but == "on" {
music_but.onPress = function(){
my_sound.setVolume(0);
music_but = "off";
}
else if (music_but == "off"){
music_but.onPress = function(){
my_sound.setVolume(100);
music_but = "on";
};
Can anyone help me format this correctly? Thanks!