Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sound not working?

Asked by 9 years ago
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

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
9 years ago

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
Ad

Answer this question