=Problem=
Script Errors On Line 11; Attempt to index nil Value
=Script=
deb = false
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=713970194"
animTrack = script.Parent.Parent.Parent.Parent.Humanoid:LoadAnimation(animation)
function onDamage(Part)
print('fired') -- prints
if Part.Parent:FindFirstChild("Humanoid") ~=nil and script.Parent.Parent.Parent.Parent.Swinging.Value == true and deb == false or Part.Parent.Parent:FindFirstChild("Humanoid") ~=nil and deb == false then
deb = true
if Part.Parent:FindFirstChild("Blocking").Value == true or Part.Parent.Parent:FindFirstChild("Blocking").Value == true then -- error's here
print('play')
animTrack:Play()
Part.Parent:FindFirstChild("Blocking").Value = false
else
Part.Parent.Humanoid:TakeDamage(script:WaitForChild('Damage').Value)
print('play')
wait(.5)
deb = false
end
end
end
script.Parent.Touched:connect(onDamage)
