Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

As I put two songs in my place?

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

1 comment

0

can you place the code in lua block please?

1 answer

✓ Accepted answer

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

7 comments

1

Wow It works perfectly! Thanks Bro!

1

but it only works if the two IDs are the same? with different IDs don't work

0

there, edited

1

Ok, thanks!

0

when the songs are very big does not work, i think its a bug

0

You mean 2 minute songs? Well that's a problem with roblox, i swear, this is the best script you can find.

0

Well , what a pity .-. , but your script its very good thanks for the help

This discussion is preserved as it was. New answers, comments, and votes are closed.