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

How to check if a humanoid is falling?

I want to make a jetpack but I am not sure how to make this script work only while they're falling because I want the walkspeed changed to 25 when they are falling, so I have this so far.

ToolEquipped = true
Humanoid.Walkspeed = 25

If there is a way to make this happen, then can someone tell me how to edit the fall speed while this gear is equipped?

Thanks.

1 answer

✓ Accepted answer

###Yes there is. You'd use the StateChanged event.

Humanoid.StateChanged:Connect(function(_, new)
    if new == Enum.HumanoidStateType.Freefalling then
        -- code 
    end
end)

1 comment

0

Thank you so much.

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