#tool damage

8 messages · Page 1 of 1 (latest)

grizzled epoch
#

script doesnt giving damage, what gives problem?

#
local debounce = false

print("f")

script.Parent.Handle.Touched:Connect(function(other)
    print(other.Name)
    if debounce and other:FindFirstChild("Humanoid") and other ~= script.Parent.Parent then
        debounce = false
        other.Humanoid.Health -= 12
        print(other.Humanoid.Health)
    end
end)

script.Parent.Activated:Connect(function()
    print(debounce)
    if not debounce then
        debounce = true
        wait(1)
        debounce = false
    end
end)
proud ember
#

does the output say anything?

grizzled epoch
#

nope

peak sorrel
#
local debounce = false

print("f")

script.Parent.Handle.Touched:Connect(function(other)
    print(other.Name)
    if not dbounce and other:FindFirstChild("Humanoid") and other ~= script.Parent.Parent then
        debounce = false
        other.Humanoid.Health -= 12
        print(other.Humanoid.Health)
    end
end)

script.Parent.Activated:Connect(function()
    print(debounce)
    if not debounce then
        debounce = true
        wait(1)
        debounce = false
    end
end)