I’ve got a system, where you can chop a tree down, and it’ll drop wood. Problem I’m thinking of now is if this is better handled on the client (currently handled on the server)
Basically all the client does is when a player clicks, it creates a ray from the player to where they clicked (using whitelist for where I store the trees) and if the part they happened to click on is inside of the Trees folder then go to the server. Server then gets that item, sanity checks that it is actually inside the Tree folder and then takes away the trees durability (each tree has a NumberValue with its durability)
Problem with this however is when a player cuts down a tree, nobody else can. Trees regrow eventually, yes, but if all the trees have been cut a player may have to wait a while before they can get anymore progress made.So should I do the whole tree cutting on the client?
Problem I foresee with this idea, is the client can just:
- Set the durability in the tree to 0 instantly (no cutting needed) and thus not use their axe (tools have durability, so lose durability when they are used)
- When a trees cut, it drops 3 wood parts, that they can pick up. They could clone those, and thus collect a ton.
Probably more problems, but ye
So if anyone has any input, it’d be greatly appreciated