Here is what I did, but it still spams the onTouched event.

local debounce = false 

function onTouched(hit) 
	if debounce == false then 
		debounce = true 
		script.Parent.Sound:Play()
		wait(4)
		debounce = false 
		else debounce = false 
	end 
end

script.Parent.Touched:connect(onTouched) 

Thank you for your time! Your awesome!

2 comments

0

Remove line 9. Once you make it false with the else statement it is free to go back to going to use again.

0

Thank you!