what happened was, i made a sword with animation and it was successful apart from the damage script, It keeps putting a error up that makes no sense and I cant unpatch it.
--Players.KOOLKILLER786.Backpack.ClassicSword.Damage:10: attempt to index local 'hum' (a nil value)--
--Script--
local CanAttack = script.Parent.CanAttack
script.Parent.Handle.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if CanAttack.Value == true then wait()
CanAttack.Value = false
hum:TakeDamage(20) end end)
--
Please Help me

1 comment
Please use the "Lua" when asking a question.