Sound playing multiple times on tool.Activated event

Hello Developers,

For some reason the sound that I want a tool to play when the .Activated event is fired fires multiple times in quick succession.

Here is the code in question:

	if mouse.Target ~= nil and mouse.Target:IsA("BasePart") and mouse.Target.Parent.Name == "Farmland" and mouse.Target.Parent.Parent.Name == (player.Name.."'s farm") and debounceTill == false then
		debounceTill = true
		
		script.Parent.TillEvent:FireServer(mouse.Target)
		tool.Sounds.Till:Play()
		
		task.wait(.2)
		debounceTill = false
	end
end)

Any help is greatly appreciated!

Thank you,
Lucid

Do you have any loop in that script?

I do have loops in the script, however they aren’t affecting any sounds or anything within the tool.Activated event.

(Forgot to add this in the original post, but here’re the properties of the sound played)

The way I see it I don’t think this part of code is necessary, don’t know if that solves the initial problem though

if mouse.Target.Parent.Name == "Farmland" and mouse.Target.Parent.Parent.Name == (player.Name .. "'s farm") and debounceTill == false then
                task.wait()
		debounceTill = true
		
		script.Parent.TillEvent:FireServer(mouse.Target)
		tool.Sounds.Till:Play()
		
		task.wait(.2)
		debounceTill = false
	end
end)

I reformatted it, hope it works