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:
local player = game.Players.LocalPlayer local char = player.Character local animation = script.fight animation:Clone().Parent = char.Humanoid wait(1) local animTrack = char.Humanoid:LoadAnimation(animation) animTrack:Play() animTrack.KeyframeReached:connect(function(slash) script.slash:Play() end)
local player = game.Players.LocalPlayer local char = player.Character local animation = script.fight animation:Clone().Parent = char.Humanoid wait(1) local animTrack = char.Humanoid:LoadAnimation(animation) animTrack:Play() animTrack.KeyframeReached:connect(function(slash) local clone = script.slash:Clone() clone.Parent = script clone:Play() --* end)
look at the sound instance like a CD player. It can only play one track at a time. So if you want to listen to multiple sounds at once, you need more cd players. the line marker --* was changed to make a copy of the sound and play it instead