local Tool = script.Parent
local Mouse = game.Players.LocalPlayer:GetMouse()
debounce = false
waitDealy = 5
Tool.Activated:Connect(function()
if Tool.Equipped then
if Mouse.Target and Mouse.Target:FindFirstChild("ClickDetector") then
if (Tool.Handle.Position - Mouse.Target.Position).Magnitude <= Mouse.Target.ClickDetector.MaxActivationDistance then
if not debounce then
debounce = true
local plr = game.Players.LocalPlayer
plr.Wood.Value = plr.Wood.Value + 1
end
end
end
end
end)
Tool.Deactivated:Connect(function()
if Tool.Equipped then
if debounce then
wait(waitDealy)
debounce = false
end
end
end)
my script cant false debounce how to fix it?
