Making a playlist

Hi, I am trying to make a sound playlist for my game so I searched for tutorials and I found @DecodedMint 's one. The tutorial is very good and well explained but the music just doesn’t plays and I don’t see any error messages in my output. Maybe I made something wrong ? In the properties ? I need help :confused:

Here’s the code image

Hey there! i would suggest you make sure that the volume of the sounds to be 0.5, because it was in 0 it may not work.
Also check the playback speed of the audio to be 1

2 Likes

The volume is at 0.5 and the playback speed at 1

Adding some screens of the properties tab :
image image

oh, i would then suggest you to try this script out.
it comes with an optional music mute button as well!

local curmusic
local musicfiles = script.GameMusic
local mutebutton = script.Parent
local initialvolume = 0.5
mutebutton.MouseButton1Click:Connect(function()
	if script.Parent.ImageTransparency == 1 then
		script.Parent.ImageTransparency = 0
		curmusic.Volume = initialvolume
	else
		script.Parent.ImageTransparency = 1
		curmusic.Volume = 0
	end
end)
while true do
	local music = musicfiles:GetChildren()
	for count = 1,#music do
		local ran = math.random(1,#music)
		music[ran]:Play()
		curmusic = music[ran]
		music[ran].Ended:Wait()
		table.remove(music,ran)
	end
end
2 Likes