So i’m adding air combo to my script, looks something like this:
Now, i want to switch from normal m1 animations, to aircombo animations, also add body velocity when you hit so i stay in the air. Now i need a way to detect it, i know i can use humanoidstatetype to do it but i was wondering if its a good way to detect if youre not touching the ground, or is it smart to use a raycast for that?
Raycasts for me have always been more consistent. Especially when you have combat effects that change the Humanoid State for stuff like ragdolling and whatever else.
A raycast is more customizable and offers more room for math if you need it. Otherwise it’s up to preference.
Say if you want a specific attack to only happen during that combo after you punch some one in the air, you can measure the distance between the character and the ground to make sure the player is higher than just a regular jump, making it so that when you jump, you can not perform the same attack as being in an air-combo.