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)

3 comments

0

when ever i go up to a dummy, the touched event fires, i want the touch event to fire when it is activated

0

What do you mean 'when it is activated'? A touched event is activated when you touch something

0

i have another script which swings the sword, i want this script to run when the sword swing script runs and stop when the sword swing script stops