Audio Not Working in Live Servers

Hello everyone,

This is a semi-complex issue, but I’ll try to keep it simple.

If you like your explanations in video form, I also recorded a demo of it happening. I would post this to Bug Reports, but I can’t post in the Bug Report part of the forum, so I’m hoping it can be solved through scripting. Anyways, here’s the video version of things:

But essentially what is happening is 1 major component of audio is not working within my game. Background music will play, the engine sound effects on cars will play, GUI sounds (like clicking) will play, but when cars crash into the wall, the crash sound effects will not play.

BUT: They only stop playing in LIVE SERVERS THAT HAVE BEEN PLAYED FOR A WHILE. It works completely correctly in studio and brand new servers with only a handful of players. But once the server is older or has more players, the crash impact sounds stop playing. I have a Discord webhook that sends me all errors, and there are none to speak of. I also joined a server while testing this and checked the console; also no errors.

So please, if anyone has ANY idea why that one specific type of audio stops working, please, let me know. I can’t even begin to explain why JUST the crash impact audio would stop working.

2 Likes

I have been experiencing this issue as well many times. Like I join my game where there are players and I have 0 sounds. Sometimes the sounds look like if they were glitching. (It happens rarely though, 5% chance of happening I imagine)

Also, I should add, players leaving does not fix it, so it doesn’t seem like it’s just happening from too many players.

For instance, if the player has 12 players and goes down to 8, the issue isn’t fixed, so it seems more tied to server uptime duration.

But I didn’t make any changes to any scripts, it just started doing it on it’s own. It used to work fine, but now it doesn’t. Did Roblox make any sort of internal changes that might have caused this?

Yeah I don’t know the problem. I got a few (debunked) ideas though:

  • My first idea was maybe a memory leak that made the crash sound not play since there was no more room but since every other sound is playing, that’s probably not it.
  • Maybe you have a scripting leak that is causing more and more lag as the server gets older. But then it would be very noticeable and your car wouldn’t be able to crash as fast as it did.
  • Maybe the sound script for your crash sound is relying on a wait() or something which gets canceled out from server lag. But then it would fire half of the time in older servers, so not really.

Best thing I could do is just look at any scripts you have, especially ones specific for the car crash.
It might also be an internal Roblox thing, but I’ve always been able to resolve those using more efficient and “proper” code.

I’ll definitely look into it, because I know in the past it’s 99% of the time some fault of my code and not Roblox. But what really baffles me is that there’s no scripts taking up a lot of activity time/percentage. No scripts come even close to the 3% script activity that it’s recommended to keep below.

Does anyone think it could be because the sound effects are being instantiated on the server, and that it should be done locally?

FINALLY FOUND THE PROBLEM!

There was a debounce that was getting stuck on ‘false’. Not exactly sure why it worked for so long and just now started showing issues, but I’m so glad I finally found the issue!

1 Like