How to sway a tree trunk back and forth?

Not exactly sure if this goes in the scripting section, but I figure scripting is really the only hard part about the whole thing.

Like the title says, how do I sway a tree? It would be cool if I could learn to sway the leaves too, but the trunk is mostly what I’m looking for.

I know what you’re thinking: This isn’t a good idea, it would cause extreme lag.
Sure it would if I had to apply it to multiple trees.
But I only need it for one tree, and the tree doesn’t have a mesh, it’s just a plain old part.

Please, feel free to share your thoughts.

Well, you could divide it into tons of smaller parts and tween it or something like that. But it would be a far better idea to just make it a mesh and use mesh deformation.

1 Like

Shouldn’t take any performance really as it’s just an animation. Rig the trees, add bones and animate it in the animation editor and then play it with a script. There’s tutorials on how to use the bone system.

I’d suggest animation. If you don’t want much lag, you could union the leaves together.

You can use TweenService to smoothly move or rotate the trunk of the tree.
CFrame.new or CFrame.Angles