How do I make it so sounds don't get cut off when the same sound plays again?
So I have an animation being played on the character, and when a certain keyframe has been reached, it plays a sound. Since there are many key frames that play the same sound, the sound plays repetitively. The problem is that the sound currently playing gets cut off when the sound plays again. If you don't understand what I'm talking about, I'll post two examples.
This is what I want it to sound like: https://instaud.io/13ge
What it really sounds like in game: https://instaud.io/13gf
As you can see, with the second audio the sound gets cut off when the same sound plays again.
Also, here is the script I made just in case:
01 | local player = game.Players.LocalPlayer |
02 | local char = player.Character |
03 | local animation = script.fight |
05 | animation:Clone().Parent = char.Humanoid |
09 | local animTrack = char.Humanoid:LoadAnimation(animation) |
12 | animTrack.KeyframeReached:connect( function (slash) |