debounce=false
script.Parent.ClickDetector.MouseClick:connect(function ()
if debounce==false then debounce= true
script.Parent.BrickColor = BrickColor.new("Bright red")
script.Parent.Parent.Sound:Play()
script.Parent.Parent.Sound.Volume=.5
else
script.Parent.BrickColor= BrickColor.new("Bright green")
script.Parent.Parent.Sound.Volume=0
debounce=false
end end)
Ok so instead of making the volume go to 0 all the time, how do I pause the sound so it'll stop going while the sound isn't playing? |