The sword does damage without being clicked?
It does damage when it's touched
I have no idea how to fix this.
The Damage Script For My Weapon
Av = 15 --Attack Value
tool = script.Parent
function tagHumanoid(humanoid,killer)
if humanoid and killer then
local tag = Instance.new("ObjectValue")
tag.Name = "creator"
tag.Value = killer
tag.Parent = humanoid
end
end
script.Parent.Handle.blade.Touched:connect(function(p)
local plr = game.Players:GetPlayerFromCharacter(tool.Parent)
if script.Parent.CanDamage.Value == true and p.Parent:FindFirstChild("Humanoid") then
script.Parent.CanDamage.Value = false
local humanoid = p.Parent:FindFirstChild("Humanoid")
humanoid:TakeDamage(Av)
tagHumanoid(humanoid, plr)
wait(1)
script.Parent.CanDamage.Value = true
if p.Parent.Humanoid.Health < 1 then
print("Player Has Died")
end
end
end)
