So I'm scripting an automatic gun and I have a repeat loop used for firing bullets. Every time this loops, I play the gunfire sound. The problem is that when the sound loops, the new gunshot cuts off the old gunshot (just like replaying the audio file). I'm wondering how to make it so that it doesn't replay the audio and instead the gunshots don't affect one another. I thought of making 2 sound Instances and interchanging them and it works but I'm not sure that is the best way to go about this.
local sound = tool:WaitForChild("Gunfire")
repeat
sound:Play()
...
...
until shooting == false
What should I do?

2 comments
I don't think its the audio, I think its that playing an audio while its already playing replays it instead of playing both of them. I was just hoping to see if there was an easy way to do that
Hmm, Let me try to figure something out..