Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to check if player is in the air?

Asked by 8 years ago
Edited 8 years ago

Hi, I am making a fighting technique for a game, and I was wondering how I could make the fighting technique not run if the player is in the air. So, how would I make a condition like this?

I tried using the code

1if character.Humanoid.FreeFalling then return end

but the player wouldn't be able to run the fighting technique at all with this condition

0
I guess if the legs are not being touched then your in the air? Idk the most efficent this is just a basic one Kakitoku 32 — 8y
0
If the axis is above the ground then the player is in the air farrizbb 465 — 8y
0
I made an edit to my question. Sorry guys. iiTylerSoul 56 — 8y
0
I know this might sound like a lot of work (Not really) but maybe try using rays/ray casting to detect a part at their distance? UltraUnitMode 419 — 8y

2 answers

Log in to vote
2
Answered by
gdunn2 54
8 years ago

I think there is an event called freefalling try something like this:

1char.Humanoid.FreeFalling:connect(function()
2    --code in here
3end)

sorry if im wrong lol

0
Yes, I have checked the API, and there is in fact a "FreeFalling" event. jamesarsenault 192 — 8y
Ad
Log in to vote
0
Answered by 8 years ago
Edited 8 years ago

Use event "FreeFalling".

Answer this question