When the player clicks, it enables a variable bool called "toggle" to true. Then that is supposed to damage the NPC once, but it doesn't. It also doesn't apply the "click to activate toggle". Here's the script.
local weapon = script.Parent.Parent.Handle.HitPart local dmg = script.Parent.Parent.Interval.Value * 20 local toggle = true weapon.Touched:Connect(function(part) if part.Parent:FindFirstChild("Humanoid") then if toggle == true then local humanoid = part.Parent:FindFirstChild("Humanoid") humanoid:TakeDamage(dmg) toggle = false wait(1) toggle = true end end end)
It's a server script inside of another server script inside a tool called "Wooden katana".