name = "Humanoid" function OnTouched(hit) i = 0 Humanoid = hit.Parent:FindfirstChild("Humanoid") if Humanoid then hit.Parent:FindFirstChild("Humanod").Health = i end end
script.Parent.Touched:connect(OnTouched)
name = "Humanoid" function OnTouched(hit) i = 0 Humanoid = hit.Parent:FindfirstChild("Humanoid") if Humanoid then hit.Parent:FindFirstChild("Humanod").Health = i end end
script.Parent.Touched:connect(OnTouched)
You spelled Humanoid wrong after the if statement ('Humanod'):
function onTouched(hit)
local i = 0
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
humanoid.Health = 0
end
end
script.Parent.Touched:connect(onTouched)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
In future, can you put your code into the code block.. Makes it easier to read
The output should have told you your spelling mistake, look there as well in future