Sound overlapping itself?

Simple setup, weird problem.

I have a sound I want to loop until a condition returns false. But when it plays, it sounds like it’s playing a thousand times at once, and it just sounds like a swamp of bees instead of the actual sound. In the code I even have it set to “PlayOneShot”, and I don’t have “Loop” checked in the Audio Source. And it does look regardless (which is what i want), but again, it sounds like the clip plays itself a thousand times.

Imagine if you pressed something on the keyboard, and you got that Windows error sound, and then you held that button down. it’s pretty much like that.

Any ideas what’s wrong?

99% sure that your code is wrong.
You’re not setting flags or checking conditions properly.
That results in you playing a new instance of the audio every frame as opposed to once

1 Like

Thanks, fixed it. :slight_smile:

how

Probably removed PlayOneShot() from being fired on every Update() or something like that.

1 Like