How could i make this play another music after the one playing has stopped? Right now it only plays the same music again
local music = script:GetChildren() while true do for i,v in pairs(music) do if v.Playing == false then repeat wait(1) v.Playing = true until v.Playing == false end end end
Your way of playing sounds is completely wrong.
To play a sound, call sound:Play()
This only needs to be done once and then lets you do whatever from then on.
If all you want to do is play music in a loop then wait until the Ended event is fired.
--Assuming sounds is already defined as an array/table of sounds for _, s in sounds do s:Play() s.Ended:Wait() --Pauses execution until sound ends end