Hello. I’m trying to make a system that will spawn trees and grow them using GrowthStages (“Baby”, “Medium”, “Adult”), I have done the system that register and index the trees but I don’t know how could I make their growth. I was inspired by Lumber Tycoon 2 system and Tree Generator module
You can do something like
local Tree = workspace.MeshPart
Tree.MeshId = “BabyTreeMeshId”
wait(“number here”)
Tree.MeshId = “MediumTreeId”
wait(“number here”)
Tree.MeshId = “AdultMeshId”
I hope this helped.
Btw this is a very basic growth system.
Hi, i’ve actually never played lumber tycoon but im supposing you mean growth stages once it reaches a certain point like Dinosaur Simulator (if youve ever played that)
What you can do:
Make a numbervalue, set it’s name to which every growth stage you want it to:
babyStage
Make a script that checks if the numbervalue has hit 100 or a certain point when it will respawn the player as the next growth rate and repeat untill you want it to stop. Example:
While true do
wait()
if babystage.value == 100 then
(what ever you want here)
end
for it to generate randomly you can make like 100 different sets of trees and the game will randomly choose for which tree a player will become, unless you want the tree parts to just start growing randomly or change shape sizes you can mess around or orginposition, orientation, and size with wields that hold them together
if that still doesnt solve your problem then mess around with tween services
if all those still dont work then no idea
As far as branching and making them bigger, you can just use recursion and coroutines. However if you want to make set models bigger then you’ll have to create a custom function as to scale all parts individually, and then offset them.
With this, you’re not creating any premade models apart from possibly the actual parts for the branches and leaves. They’ll be 100% procedurally generated .
Well, if u want stages, u can use this same module i made, by changing the BranchGenerator function, so u could make the stages with how many branches the tree would have, but u would need to mess a lot with that function
Well I can’t understand how do you calculate all the positions, I can do start position for tree but positions for another logs I’m just too stupid I guess
Take a look at cframing, i also had some problems with that, i asked for help at the rodevs discord server, i got this answer, when rotating the next branch u need to set it’s cframe to – >
yes, that’s the formula for getting rotation with a ringe part, u can see it working way better at the roblox documentation, there CFrame:Inverse is used, but i’m dumb so i didn’t like to use that