So keep In mind, I can’t really follow code and basically know nothing about coding.
I’m trying to create a looping rain sound. I am using the background music kit by cindering which already loops the audio over and over again. The problem is most of the high quality rain effects are short like 7 seconds and when it loops and starts again you can clearly hear it is restarting. It does not sound like a consistent ambient noise. Any solutions for this?
Without scripting, this is not possible. The easy solution would be to find another sound that works for you, although speaking from personal experience it is pretty hard to find sound effects that don’t phase in at the beginning or end. A short script that starts the sound each time at 1 second in and goes back to the beginning one second before the end of the recording would be the only way that comes to mind for solving this.
Just like @Protectorates said, You can make a script that makes the audio stop 1 second before and then loop. But you have to use while true do and make the audio play by making your audio into a local sound = game.Workspace.Sound Then making it something like:
- This is a loopable Sound Script.
local sound = game.Workspace.Sound - enter your Sound name here
while true do
sound:Play - Plays the music
wait (6)
sound:Stop - Stops the music
end
If you feel like this is too much trouble then try uploading your own audio or try scavenging the library for a good loopable rain sound! I’m pretty sure there is still a lot of loopable rain sounds.
Jonibus was right the first time; this is an issue with the sound you’re using. Programming won’t help you here, it shouldn’t be used and it’s not the only solution to the problem, fix the sound file instead.
Make sure that your rain sound file perfectly loops and is uploaded as an OGG file. If the sound isn’t designed to be looped perfectly or is uploaded as an MP3, then you will hear that brief moment where the sound restarts and doesn’t sound like a perfect loop.