#jump detection

29 messages · Page 1 of 1 (latest)

warm locust
#

hey guys, i'd like to make it so some gui i have doesn't do anything if the character clicks it while in the air, since theres an animation i need to anchor the player for, and it locks them midair.
i know how to stop the gui from doing anything, but how can i detect if the player is midair?
rn im thinking you could do it by checking if the jumping animation is playing, im not sure what the syntax or functions for that would be though.

if you have any other ways i can check if the player is midair lmk please, preferably i'd like to keep it on a localscript

terse storm
#

not sure if it'll work but theres a property in the characters humanoid called jump its enabled when you jump (obviously)

warm locust
#

interesting im gonna try that out

#

a simple if function should work im pretty sure

#

i tried a quick test using

    print("player jumped")
end```
i also tried switching Jump with AutoJumpEnabled incase that was holding down the jump, but the first one didn't print at all and the second only printed once at the start of the test
#

i'll have to find something else some other time

#

im too tired i stayed up on studio 😭😭😭

terse storm
#

i did some testing

#

its only true while the spacebar is held

warm locust
#

weird i didn't get that result

terse storm
#

i put it in a loop

warm locust
#

hmmmm

#

that could work

#

i think

#

thanks i'll do some more messing around later

terse storm
#

np

austere urchin
#

@warm locust use the FloorMaterial property

#

Humanoid.FloorMaterial

#

And you can check if it equals air

#

Enum.Material.Air

warm locust
#

i gotta get familiar with properties of common things in studio

empty pineBOT
#

studio** You are now Level 3! **studio

warm locust
#

i had no idea that was a thing

#

ima try it out later you’re awesome

austere urchin
#

Np

frosty atlas
terse storm
#

it is

terse storm
frosty atlas
#

mb