I have a song and I want to transition the song with another song. But in order to do this, I need to lower down the volume while it plays until you can't hear it anymore. Any ideas on how to do that in a script?
✓ ANSWER ACCEPTED
Music volume down ?
2 answers
✓ Accepted answer
Sounds have a property called 'Volume' 1 is basically the max volume and 0 is mute so lowering it in increments of 0.1 would be most effective. Use a loop to lower the volume gradually.
Example:
for i = 1, 10 do
sound.Volume = sound.Volume - 0.1
end
To learn more about loops go here.
Heh, this should work, I am using a for loop which will repeat the code a certain amount of times:
for msound = 1, 0, -0.1 do --1 to 0, decreasing by 0.1
game.Workspace.Sound.Volume = msound --What its used on
end --Ends the keyword for
1 comment
0
You don't have to post something better, but at the same time, nice answer.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Who disliked this? He was simply asking how to lower the volume of a sound so I helped a bro out and told him about the Volume property and loops. Chill out
Disliked since you put a for loop labeling it as "i" yet never used i in the script. Plus I'm not quite sure what "sound" is referring too:)
@acecateer Including that 1 going to 10 wouldn't be decreasing, it would be increasing. It should be for i = 1, 0, -.1
This is just an example dude, chill yourself out. Go outside or something for a little bit and cool down. 'sound' was just referring to whatever sound he was going to have it's volume lower.