Roblox updated and suddenly some audios are stuttering, some aren’t playing, some are looping forever, and some are lagging the game really heavily. This is a very major bug that is currently happening in my game and I have no idea how to fix or workaround this.
The reproduction file contains how to replicate the audio playing and lag issue where the audio doesn’t play and lags the client heavily. AUDIO REPO.rbxl (57.1 KB)
I cannot reproduce the audio stutter OR loop issue but I do have footage of it.
Expected behavior
For the audio not to have any sort of stutters, lag the client, or just not play.
Not sure what you mean by audio players unless you mean sounds inside of an object but if so, yes it does in fact happen in those. The stutter and infinite looping bug is caused by those, the music not playing and lagging the client is just a sound in a script. To add onto the music not playing sometimes when the client lag spikes you can faintly hear it play and then cut out right after.
It is not my experience and I do not have a video of how it’s intended to sound, but it should just play once, and not play again until you jump again.
Also to add onto this, here is footage from Cube Cavern Classic, the engine that Cube Cavern Reborn is based on.
These are the lines that play the audio, when you press space it starts a coroutine, then it does a loop with some other code for player velocity while you hold it and plays the audio within that loop.
Hi, are you able to send us repro files for these two videos as well? They might be separate bugs from the first one (the AUDIO REPO.rbxl, which does reproduce the problematic behavior on my side) that you sent us.
I unfortunately cannot reproduce this in a seperate place, the only one I can reproduce is the audio not playing and lagging the client which is in the original post.
Hey so I had the same issue in my game, my solution to it was to find out where in the script I was changing the soundid constantly and stopped it from doing it. Just put an if else statement somewhere in there to only update it when its receiving a different value. Well thats what I did, hope this helps either how.
Yeah that is what indeed causes the problem, thing is it didn’t do this before so games that relied on that like mine just broke overnight and suddenly have major lag problems.
Thanks for the reports everyone - we’re working on a fix. For now as a workaround you can guard every instance of setting a SoundId with a check that it’s not already assigned:
if sound.SoundId ~= newId then
sound.SoundId = newId
end
Let us know if you’re still observing issues even with this workaround!
Coming back to say the audio stutter problems and loops are also caused by setting the SoundId on a heartbeat, forgot that some of the sound ids in the game are always updating due to the different items and equips so it is not a separate issue but is actually just the same one.
thanks to the OP for reporting, this happened to me too
i change the sound ID of a FootstepSound inside of HeartBeat connection and it causes lag when the character lands after jumping (even tho it was fine before)
Thank lord I’m not the only one that has this issue. Its frustrating knowing I’m working on a game and my testers struggle to test, because the games soundtracks just lag the game to the point its unplayable & untestable.
We should have a release going out today with the fix in it, but it’ll take a bit longer for the release to hit all platforms. Let us know if you continue to see it being broken