Melee-like function?

Hi! I’m making an Island survival game. I want the character to punch trees, how do I do that? (no, I’m not making minecraft) Anybody with a snippet of useful code is deeply appreciated!

use ray casting and distances.

you could also use collision, when collision is detected stop the animation in its tracks. Anination class will have something that will do the trick but as fattie said there are hundred of these questions. finding the question and using information people already answered will save you a lot of time waiting here

make sure you research into them first, and make sure they aren’t already answered, also why are you posting this as answer. the Devs on here tend to get annoyed with things like this.