how do i prevent a touched event from firing unless it is activated?
Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
local deb = true
script.Parent.Enabled = true
script.Parent.Blade.Touched:connect(function(hit)
if not script.Parent.Enabled then
return
end
script.Parent.Enabled = false
if equipped and humanoid and humanoid.Health >=0 and deb == true then
deb = false
print(hit.Parent.Name)
target = hit.Parent:FindFirstChild'Humanoid'
if target and target.Health >= 0 then
print(hit.Parent.Name)
target:TakeDamage(damage.Value)
end
wait(.8)
script.Parent.Enabled = true
deb = true
end
end)