Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make a choppable tree like in this youtube video?

Hey, so I've been trying to make a choppable tree lately that seems realistic by leaving axe marks in the tree then eventually leading to the tree to fall over. So I've done a bit of research on how to do it but the best thing I could find was an example of what I wanted to accomplish. I know how to do everything but "chip away" pieces of the tree. Here's the video I was talking about: https://www.youtube.com/watch?v=MvBiRnCdWgw

If somebody could lead me in the right direction that would be great. Thanks!

2 comments

0

It looks to me like they have a set of parts on a hardcoded Y position, then the rest of the tree is separate larger parts. It also seems like they get the direction of the player rather then the actual axe.

0

How would you get the direction of the player? That's the only problem I'm having.

1 answer

You could write a script that determines from which direction the axe hits, and adjusts the size depending on that. Judging by how the parts shrink, that seems to be how he does it. Also make sure that it separates the part that it hits, or it could shrink the whole tree. You can also make the tree out of several different parts if that would be easier.

5 comments

0

Hope I could help!

0

Well, the only problem with that is that I haven't got a clue on how to write a script the determines which direction the axe hits.

0

Vector3 and it's data types can allow you to determine things like Direction and Position.

0

If it isn't a chunk of your time could you write out a script for me to go off of? I don't know how to determine the direction of the axe

0

Sorry, but I'm going to have to decline. This would be a good point to learn how Vector3 works though, as it will be essential for making games. Also, to save you a bit of trouble, the exact thing you're looking for is called a Ray.

This discussion is preserved as it was. New answers, comments, and votes are closed.