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

I'm not sure why it my music player is not playing, mind helping me find out?

This is the first time I've made a music script (Along With My Friend), but I don't know why it's not working. I tried changing the parenthesis to "{" but, it still does not play...

-- Sound player by XtremeBloxer and Seith.
	-- Version v.1 ( I have no idea how to play 2 'ids..).

print("Bloxer's music script loaded")
wait(2)
local IDplayers = {"215733323",  "235855135"} -- I'm not sure if I should put local..

for _, i in pairs(IDplayers) do -- ... GOSH
local sound = Instance.new("Sound", game.Workspace) 
sound.SoundId = "http://www.roblox.com/asset/?id="..IDplayers.."" -- Is this right?
sound:Play()
repeat wait() until sound.IsPaused == true do
    sound:remove()
end
end

-- Thanks for using Bloxers music script.
	-- I would also thank ROBLOXSCRIPTHELP'ers for helping (nuduh).

3 comments

0

Thanks!

0

Is this suposed to do 1 song at a time?

0

It is sopossed to do one, but when that is first song is finished, I want it to play another song.

1 answer

Just fixed it, this works fine

-- Sound player by XtremeBloxer and Seith.
    -- Version v.1 ( I have no idea how to play 2 'ids..).

print("Bloxer's music script loaded")
wait(2)
local IDplayers = {"215733323",  "235855135"} -- I'm not sure if I should put local..

for _, i in pairs(IDplayers) do -- ... GOSH
local sound = Instance.new("Sound", game.Workspace) 
sound.SoundId = "http://www.roblox.com/asset/?id="..IDplayers[math.random(1, #IDplayers)] -- Is this right?
sound:Play()
repeat wait() until sound.IsPaused == true do
    sound:remove()
end
end

-- Thanks for using Bloxers music script.
    -- I would also thank ROBLOXSCRIPTHELP'ers for helping (nuduh).

the problem is you were trying to play a table, not a value, lol.

5 comments

0

Uh, one more thing, how do you accept answers... I'm new here. :]

0

mind accepting this answer because it works

0

oh, there should be a "Accept Answer" button near the answer somewhere.

0

Wait, it only plays one song..

0

oh? sorry, I'm busy trying to do something, maybe the other answer will work

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