you need to somehow put an audioPlayer?.stop() when seOn is false
this is to ensure that the player (because it is global) is not playing anymore then you toggle it (even if it wasn’t even turned on in the first place
Ok, thank you. I’ve been trying to give that a go unsuccessfully, also i couldn’t find anything on stackoverflow. Do you perhaps have an example of what that might look like?
I was also going to use if statements but when i try and make the bool a ObservedObject i get an error saying: Generic struct ‘ObservedObject’ requires that ‘Bool’ conform to ‘ObservableObject’. Then if i make it ObservableObject i get an error saying: Unknown attribute ‘ObservableObject’.