I'm trying to make it so that if a character touches another character and has more hp, The character that has less hp gets destroyed. I'm not talking about a player's character btw, But it's giving me this strange error that I don't understand "Script:3: attempt to index nil with 'Health'"
Please help
local humanoid = other.Parent:FindFirstChild("Humanoid")
if humanoid.Health > script.Parent.Humanoid.Health then
script.Parent:Destroy()
end
end
script.Parent.Humanoid.Touched:Connect(onTouched)