Hi, my script randomly stopped working. It's a sound looper that seamlessly plays audio.
Error here is delay requires 2 arguments @ line 24
any ideas what's going on here?
--getLength
for i,v in pairs (script.Parent:GetChildren()) do
if v:isA("Sound") then
soundObj = v
print("got sound ... " .. soundObj.Name)
end
end
soundLength = soundObj.TimeLength
print("length = " .. soundLength)
function countDown(sound)
sound:remove()
end
wait()
while true do
local newSound = soundObj:clone()
newSound.Parent = script.Parent
newSound:play()
print("played new sound .. " ..newSound.Name)
print("length = " .. soundLength)
delay(soundLength, countDown(newSound)) -- line in question
print("delay fired")
wait(soundLength-1)
end

1 comment
You just saved me from a very very bad time. Thank you!