So how could I make this fade out? the music would get quit, like Wait(1) wait(2) then it fades out, help? thanks.
local s = Instance.new("Sound")
s.Name = "Sound" s.SoundId = "http://www.roblox.com/asset/?id=154786522" s.Volume = 1 s.Pitch = 2.0 s.Looped = false s.archivable = false
s.Parent = game.Workspace
wait(1)
s:play()
I added a new block of code that waits a second before reducing the volume by .1 in a For Loop.
local s = Instance.new("Sound") s.Name = "Sound" s.SoundId = "http://www.roblox.com/asset/?id=154786522" s.Volume = 1 s.Pitch = 2.0 s.Looped = false s.archivable = false s.Parent = game.Workspace wait(1) s:play() for i = 10,1,-1 do wait(1) s.Volume = i / 10 end
local s = Instance.new("Sound") s.Name = "Sound" s.SoundId = "http://www.roblox.com/asset/?id=154786522" s.Volume = 1 s.Pitch = 2.0 s.Looped = false s.Parent = game.Workspace wait(1) s:play() wait(3) -- if thats what you mean for i=1,10 do s.Volume = 1-(i*.1) wait(0.2)-- takes two seconds to fade out end