function S() while wait do wait(3) local s=game.Lighting.SoundPack:GetChildren() wait(3) local rans=math.random('[1,#s]') wait(3) local so=s[rans] wait(3) so:Play() wait(3) end end
You didn't need the line local rans=math.random('[1,#s]')
function S() while true do wait(3) local s=game.Lighting.SoundPack:GetChildren() wait(3) wait(3) local so=s[math.random(1, #s)] wait(3) so:Play() wait(3) end end