Hi, this is my script:
local wa = script.Parent
while true do
wait(0.01)
if wa:FindFirstChild("Humanoid").Health == 0 then
wa:Destroy()
end
wait(0.01)
end
Everything went well but on the Output, it saids "(Where my script is):Attempt to index nil with 'Health'", I had tried searching on how to fix the problem, some of them have similar problem to me so I tried to fix it but there is still an error. Although, my script doesn't have any red underlines there is an error.

1 comment
Thank you so much!