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

Sound not working?

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

1 answer

✓ Accepted answer

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

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