This script makes a gun fire sound play when I shoot.But the problem is, the sound stacks up and makes a horrible noise. I tried to add a wait(1) before stopping the sound and playing again but it didn't work.
local sound = script.Parent.Handle.Sound if sound.IsPlaying then wait(1) sound:Stop() sound:Play() else sound:Play() end
local sound = script.Parent.Handle.Sound if sound.IsPlaying = true() then wait(1) sound:Stop() wait(0.5) sound:Play() else sound:Play()
Try this.