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

First song in loop starts playing but others wont start after the wait?

Asked by 5 years ago
Edited 5 years ago
PlaySongs = true;
local NextSong = game.Soundscape["Dubstep 3"]
local NextNextSong = game.Soundscape["VIP Me (a)"]
local NextNextNextSong = game.Soundscape["Dubstep 2"]
local NextNextNextNextSong = game.Soundscape["Are You Ready"]

while PlaySongs == true do
        NextSong.Playing = true
    print("First Song Playing")
    wait(123)
        NextNextSong.Playing = true
    print("Second Song Playing")
    wait(68)
        NextNextNextSong.Playing = true
    print("Third Song Playing")
    wait(178)
        NextNextNextNextSong.Playing = true
    print("Fourth Song Playing")
    wait(75)
end

I have a simple little script here that just starts a loop, and yes i know there is a better thing to put all that under which i feel like is the main problem, but i just needed a loop to keep the songs playing, well back to the point. What would happen is the first song in the loop will start playing just fine, but then when its over it does print the second song is playing but no music starts playing, and i have pressed playing manually and it does start, i am also fairly new to coding so bear with me.

2 answers

Log in to vote
0
Answered by 5 years ago

Maybe instead you should change your script so that it takes music ID instead of text. This makes it complicated because you would need the song in your workspace to actually play it

Ad
Log in to vote
0
Answered by 5 years ago

View my answer here.

0
Thank you so much this worked perfecly, the music really helps my games mood now! Voidyll 8 — 5y
0
No problem. Wicked_Wlzard 110 — 5y

Answer this question