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

how do you make a sound play then stop then play then stop?

Asked by 4 years ago

So how do you make the sound play then after it end, stop for a few second, then play, and so on.

3 answers

Log in to vote
1
Answered by 4 years ago

This should help.

wait(time)
script.Parent.yoursound.Playing = true
wait(time)
script.Parent.yoursound.Playing = false

end

0
ok thanks, i am building a school game so it will help with the bell. thanks sooo much raycoolgucici 5 — 4y
Ad
Log in to vote
0
Answered by
DJH_100 28
4 years ago
Edited 4 years ago

This Would Play It Forever. If You Want That Too.

while true do --DJH_100
    local beep = script.Parent:FindFirstChildOfClass("Sound") --Finds The Sound. 
    local timer = 1 --Sets How Much To Wait.
    beep:Play()--Play
    wait(timer)--Wait
    beep:Stop()--Stop
    wait(timer)--Wait'
    --Repeats
end
Log in to vote
0
Answered by 4 years ago
audio = script.Parent
cooldown = 5

while true do
    audio.Playing = not audio.Playing
    wait(cooldown)
end

the simplest out of them all

Answer this question