I really want to fade my audio smoothly but i dont know how. Any help?
COMMUNITY QUESTION
How do i fade audio out smoothly?
1 answer
As XXahraternotXX said in the comments, use a for loop to loop the audio volume down.
Here's an example,
local sound = script.Parent
sound.Volume = 1
sound:Play()
for i = 1,0,-0.03 do
wait()
sound.Volume = i
end
sound:Stop()
To make it fade faster or slower, change the number at the end of the i = thing. I used 0.03.
2 comments
4
The 0.03 should be negative. You're counting up, not down.
0
Oops, forgot.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Use a for loop