Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sounds will not stop playing when :Stop() is called?

Asked by
acecateer 130
10 years ago

I have been trying all kinds of ways to play and stop music but whenever I stop the music and remove it, it keeps playing. I simply put the sound in workspace after creating it and played it then later on I stopped it and played a different sound but the first sound continued to play... Is there any way I can actually make the sound stop playing? If so please provide a code that will most definitely stop the sound.

3 answers

Log in to vote
1
Answered by 10 years ago

Er, I would suggest a loop.

Sound = INSERT SOUND LOCATION HERE

repeat
    Sound:Stop()
until Sound.IsPlaying == false
0
Thanks it worked. acecateer 130 — 10y
0
Quite welcome. Upvote mate? Lel. SquirreIOnToast 309 — 10y
0
I got ya. Shawnyg 4330 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

With the answer given put a wait() in there to prevent a crash ;3

0
There is already a buffer against crashing. It is stopping itself. PiggyJingles 358 — 10y
Log in to vote
-4
Answered by
Reverge -1
10 years ago

That's because you must use the command.. : pause() Nothing capital

Answer this question