Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hits = script.Parent.hit
- newresource = script.Parent:clone() --clone yay
- while true do --infinite loop
- if hits.Value < 1 then --if the tree has less than 1 "hp" then
- wait(3) --wait a while
- script.Parent:remove() --remove the tree
- wait(14) --wait a while
- newresource.Parent = game.Workspace --insert a new tree
- newresource:MakeJoints() --make tree unable to fall over
- end
- wait(1) --wait a while before checking trees hp again
- end
- --it says the error is on line 7, apparently "Parent" is nil
Add Comment
Please, Sign In to add comment