local humanoid = script.Parent:FindFirstChild("Humanoid")
function onTouched(hit)--
if hit.Parent.Name == "Tree" then
hit.Parent.health.Value = hit.Parent.health.Value - 1
if hit.Parent.health.Value == 1< then
humanoid.Health = 0 -- damage the humanoid
end
end
connection = script.Parent.Touched:connect(onTouched)
Im getting an error on line 5 expected identifier, got 'then' its got the little red line under 'then' no idea why however
