There isn’t really enough information here for us to help you. Have you tried any code, at all? Showing us what you’ve tried allows us to easily check your code for errors, tell you what you might need to add or remove, etc.
Moreover, we need information like what kind of trees are you using (It’d be nigh-impossible to write a script that works for every type of tree.), what kind of axe are you using, etc.
Regardess, you aren’t supposed to use DevForum to ask full scripts. There are plenty of beginner’s guides on here, and on the Developer Hub, and I definiutly reccomend checking those out first, and attempting to write a script. Good luck!
2 basic things I’ll tell you that you need to know about…
You first, need to know how the ‘Tool’ works on roblox, secondly the Players Mouse to check whether the mouse is on a tree.
Also, you’d make the size of the tree, smaller than it was.
Well, if you wanted a system exactly like Lumber Tycoon, you’d need a lot of different elements.
For a simple version, you’d need to detect a click with the tool, and when a click is detected, see if there are any trees nearby, if there are, delete the current tree, and replace it with a tree with slightly lower durability. This is not efficient in any way, but it’s the simplest way to do this, AFAIK.
Click Detector in tool.
Check if tree’s are nearby.
Delete the nearest tree.
Copy a tree with lower durability from Server or Replicated Storage.
Take the copy, and put it in the same location as the old one.
A more advanced method and efficient, method would be via Remotes, and a simpler, but still not as efficient, would be storing the tree’s durability level via a NumberValue as a child of the tree model.
Well, instead of unanchoring, you could just have the upper portion of the tree anchored, and after ten clicks, unanchor the upper portion, causing it to fall, and leaving the stump.
What I described was a rudimentary system, to have the same capability as Lumber Tycoon, you’d need to use an entirely different system of tracking where the mouse hit.