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

Would someone help me with sound?

I know there's not an event for a sound ending, but how would I make a working music script? I'm trying to make it play a bunch of songs, but I don't know how to time it right. Here's my script:

local musicIds = {130776004,131111368,142295308,130762736,131149175,130969284,130768080,27697392,131065183,130855491,130872377,142991813,27697348}
local sound = Instance.new('Sound', Workspace)
while wait(1) do
	for i, v in pairs(musicIds) do
		sound.Volume = 1
		sound.SoundId = 'rbxassetid://'..v
		sound:Play()
		wait(10)
	end
end

1 answer

Listen to each sound and write down how long each track is in seconds. Create a table like this:

local songs = {{["AssetID"] = 1234567, ["Length"] = 15}}

Use that to your advantage.

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