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

As I put two songs in my place?

Asked by 9 years ago

I wanted to make the songs continue, example, when a song ends another begins, i have this script --

Music = 1000000001
    local Audio = Instance.new("Sound", game.Workspace)
    wait(1)
        Audio.PlayOnRemove = true
    Audio.SoundId = "rbxassetid://"..Music
  Audio:Play()

But I don't know how to do another music continue

someone can help me? Thanks

0
can you place the code in lua block please? Bubbles5610 217 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

EDIT 2

Not sure if you mean random, but let's just do a sequence.

You seem to not use the local wich is important to define variables in the script.

local Music = 1000000001 local Audio = Instance.new("Sound", game.Workspace) wait(1) Audio.PlayOnRemove = true Audio.SoundId = "rbxassetid://"..Music Audio:Play()

Now when song ends we will make it add another one!

function Id(id)
return "rbxassetid://"..id
end

local Audio = Instance.new("Sound", game.Workspace) 

while true do
wait(1) Audio.PlayOnRemove = true Audio.SoundId = Id(1000000001) Audio:Play()
while not Audio.IsPaused do wait() end
Audio.SoundId = Id(9193555) Audio:Play()
wait()
end

Hope this helps! Thanks, ~marcoantoniosantos3

1
Wow It works perfectly! Thanks Bro! 12345gabriel12345 15 — 9y
1
but it only works if the two IDs are the same? with different IDs don't work 12345gabriel12345 15 — 9y
0
there, edited marcoantoniosantos3 200 — 9y
1
Ok, thanks! 12345gabriel12345 15 — 9y
View all comments (3 more)
0
when the songs are very big does not work, i think its a bug 12345gabriel12345 15 — 9y
0
You mean 2 minute songs? Well that's a problem with roblox, i swear, this is the best script you can find. marcoantoniosantos3 200 — 9y
0
Well , what a pity .-. , but your script its very good thanks for the help 12345gabriel12345 15 — 9y
Ad

Answer this question