You can use either Jumping
or StateChanged
. They are both events of a Humanoid that can be used to tell when a Humanoid is jumping. Because they are events, you would connect them to functions, like so:
Using Jumping
:
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | player.CharacterAdded:Connect( function (character) |
3 | character.Humanoid.Jumping:Connect( function () |
Using StateChanged
, which fires with two arguments, the original state and the new state of the Humanoid:
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | player.CharacterAdded:Connect( function (character) |
3 | character.Humanoid.StateChanged:Connect( function (originalState, newState) |
By using the code given, you can expand upon what I gave you as examples to accomplish what you're looking to do.