function evalKill(hit)
if slashing then
if hit.Parent~=nil and hit.Parent:FindFirstChild("Humanoid")~=nil and hit.Parent.Humanoid.Health>0 and not hit:IsDescendantOf(script.Parent.Parent) then
if hit.Parent:FindFirstChild("Head")~=nil then
for _,s in ipairs(hit.Parent.Head:GetChildren()) do
if s.className=="Sound" then
s:Remove()
end
end
script.Parent.Handle.Kill:Clone().Parent = hit.Parent.Head
hit.Parent.Head.Kill:Play()
game.Debris:AddItem(hit.Parent.Head.Kill,2)
end
hit.Parent.Humanoid:TakeDamage(100)
end
end
end
script.Parent:FindFirstChild("Handle").Touched:connect(evalKill) -- ERROR HERE
Error Client
21:48:15.382 - Players.Player1.Backpack.Knife.LocalScript:133: attempt to index a nil value
This seems to have the error. I don't understand how it is a 'nil' value, as the script.Parent does have a Handle inside it, so I don't see why this should be breaking.
It seems to work perfectly on studio, but not when I have a server running.

1 comment
:FindFirstChild("") method finds the child. If the child can not be found, it will return nil. It's probably reading nil, so maybe use :WaitForChild() in place of :FindFirstChild()