Ask coding questions

← Back to all posts
Replit audio stop music
MuffinsTheCat (20)

I am having a problem with the replit audio module. I have a battle system in this game I'm making where I want music to play, however, the song will always play to the end. How do I instead make it stop when the battle ends? Is there a function to stop all sound from playing?

Comments
hotnewtop
FloCal35 (668)

https://docs.repl.it/repls/audio

if it's in python, add a source.paused = not source.paused at the end

OldWizard209 (1537)

Yeah, can you share the code real quick? Attach the repl. I can help you tehn