Gun Sound Trouble

and this overrides the script stopping the sound?

like if I had

local sound = --wherever the sound is

if shooting then
     sound:Play()
end
if not shooting then
     sound:Stop() -- would the echo still play after this line of code?
end

No, It would not

Summary

This text will be hidden

so there’s no point in adding an echo in my case, since the stop() would just silence it. How can I have it so it doesn’t get silenced?

The problem is most likely with the accuracy of wait()…

Instead of using a while loop,

local c
c = GunFire:GetPropertyChangedSignal("TimePosition"):Connect(function()
if GunFire.TimePosition > 5 and GunFire.TimePosition < 6 then
GunFire.TimePosition = 0
c:Disconnect()
end
end)

Which would go in place of

while GunFire.Playing == true do
print(GunFire.TimePosition)
if GunFire.TimePosition > 5 and GunFire.TimePosition < 6 then
GunFire.TimePosition = 0
end
wait()
end

Should be quicker.

And no, unless you want to actually change the sound, an echo wouldn’t help.
NOT TESTED. If you have a problem with the code I provided, please tell me.

use task.wait() instead of wait()

I was showing where he should replace it in his code, that is not my code.

I already know to use task.wait()