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
hit.Parent:Remove() **--It gets up to here, but no 'Wood' is added**
humanoid.Parent.leaderstats.Wood = humanoid.Parent.leaderstats.Wood + math.random(7,13)
end
end
end
connection = script.Parent.Touched:connect(onTouched)
this script works till line 9, but after no wood is added, why is this?

1 comment
works till line 9* the tree is successfully removed