Yeah I just need to know how you detect these thanks.
The humanoid has an event called StateChanged
that fires when the humanoid starts doing another activity like jumping, swimming, walking, et cetera. This event returns the old state and the new state as a HumanoidStateType
which is an enumeration. For moving, there is a humanoid state type called Running
, and for jumping, there is a state appropriately called Jumping
.
Humanoid.StateChanged:Connect(function(old , new) if new == Enum.HumanoidStateType.Running then --Player is running elseif new == Enum.HumanoidStateType.Jumping then --Player has jumped end end)