How can I make it so that when my user is punching he can’t jump but after the last hit he can jump but obviously he won’t be able to jump only when he is not punching?
You could try modifying the player’s Character
’s Humanoid
’s JumpHeight
, although this might not be the best way of doing it.
Try to make when the hitting animation runs the jumpheight = 0 and when the animation stops it goes back to normal, but when I hit several times and jump it lets me jump and I don’t want that
I want something like the battleground games if you are hitting you can’t jump even if you hold down space
Have you added a value perhaps? Something that is such as if the attacking value is true, then the ability to jump for a player is disabled?
This might be a bit of a longshot, but you can try detecting for a Humanoid State Change.
--method 1:
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
humanoid:ChangeState(Enum.HumanoidStateType.Landed)
end)
--method 2:
humanoid.StateChanged:Connect(function(old, new)
humanoid:ChangeState(Enum.HumanoidStateType.Landed)
end)
1 Like
Would you mind sharing your script with me, the one with the jumpheight = 0?