#How do I make a script where audio files play every 1 minute?

24 messages · Page 1 of 1 (latest)

fallen zealot
#
local Sound = game.Workspace:FindFirstChild("play")
while wait(math.random(60,120)) do
    Sound:Play()
end```
this?
daring wing
#

why random?

fallen zealot
#

1-2 minutes

#

@eternal hull u there?

eternal hull
#

cool

eternal hull
fallen zealot
#

yw im just bored

eternal hull
#

well

#

will I have to rename the ''sounds'' to the audio file?

fallen zealot
#

wait u want to play multiple sounds?

eternal hull
#

theres a file named

fallen zealot
#

or a random sound from a selected folder filled with sounds?

eternal hull
#

''sound'' as background music

#

with the script game.Workspace.play:Sound()

#

local announcment = game.Workspace:FindFirstChild("play")
while wait(math.random(60,120)) do
announcment:Play()
end

#

does it work like this?

fallen zealot
#

with 1 sound it does

eternal hull
#

oh

#

is it the one at the first line or the last line

fallen zealot
#
local Sounds = game.Workspace:FindFirstChild("play"):GetChildren()
local selected = nil

while wait(math.random(60,120)) do
    local SelectedSound = Sounds[math.random(1, #Sounds)]
    while SelectedSound == selected do
          local SelectedSound = Sounds[math.random(1, #Sounds)]
    selected = SelectedSound
    selected:Play()
end

try this, i added loops to make sure it isnt the same sound playing

eternal hull
#

alr

#

i will try it

#

will mark as solved for now

#

thanks for your help