Im trying to make a checkpoint sound, but it keeps on spamming the sound every time the player moves! What should I do?
local SP = script.Parent
function onTouch(hit)
local H = hit.Parent:FindFirstChild("Humanoid")
if H ~= nil then
SP.Sound:Play()
end
end
script.Parent.Touched:connect(onTouch)
script.Parent.TouchEnded = false

4 comments
debounce makes it that it won’t keep repeating until it ended.
@Graze022 I suggest putting the debounce = true on top.
what changed here is that you have debounce now. Which will stop your sound from repeating. Hope this helps!
@Davydas1118 still does the same thing