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

Why does these music clash together?

Asked by 10 years ago
while true do
    game.Workspace.STS:Play()
    if game.Workspace.STS.PlayOnRemove == true then
        wait(120)
        game.Workspace.F:Play()
        if game.Workspace.F.PlayOnRemove == true then
            wait(120)
            game.Workspace.NN:Play()
            if game.Workspace.NN.PlayOnRemove == true then
                wait(120)
                game.Workspace.P1:Play()
                if game.Workspace.P1.PlayOnRemove == true then
                    wait(120)
                    game.Workspace.P2:Play()
                    if game.Workspace.P2.PlayOnRemove == true then
                        wait(120)
                        game.Workspace.BF1:Play()
                        if game.Workspace.BF1.PlayOnRemove == true then
                        wait(120)
                            game.Workspace.BF2:Play()
                            if game.Workspace.BF2.PlayOnRemove == true then
                            wait(120)
                            game.Workspace.TDFW:Play()
                            if game.Workspace.TDFW.PlayOnRemove == true then
                                wait(120)
                                game.Workspace.TDFW:Play()
                                if game.Workspace.W.PlayOnRemove == true then
                                    wait(120)
                                game.Workspace.W:Play()
                            end
                        end
                        end
                    end
                end
            end
        end
    end
    end 
    end

It works fine, so I made a club and added some music. Sound STS is fine, but when the next sound plays, it clashes, and on and on and on until It starts all over because it's a loop. Any help?

0
You're not stopping the Music from playing when it finshes, so it will continually loop. I don't know enough about sounds and audio to provide a fix, but look for a way to stop the music once the time has elapsed. SlickPwner 534 — 10y
0
Why are there if statements? Just do the while loop, play, wait120, stop the first audio, play the second. Tempestatem 884 — 10y

Answer this question