Log in to vote

TouchEnded Event triggers when character jumps?

Asked by 22 days ago


I want to stop the touch ended event from triggering when user jumps.

is there a method I can use to stop/cancel touch ended event from triggering when user jumps, a couple methods I have tried. ---if Humanoid.Jump == true then return ---game:GetService("UserInputService").InputBegan.... if input.KeyCode == Space then return..

Possible methods that I have not tried: ---Comparing vector ---Possibly checking if jump animation is playing then return??

My game requires the player to jump, thus I will not be disabling it.

Thank you for reading!

(P.S) Please do not recommend using ZonePlus, and any remarks/suggestions/comments regarding to its usage will be ignored.

1 answer

Log in to vote
Answered by 22 days ago
Edited 22 days ago
if not game.Players.LocalPlayer.Character.Humanoid:GetState() == Enum.HumanoidStateType.Jumping then
    -- Player is not jumping

you can also check if the humanoid is freefalling using this as I assume you dont want the event to trigger from that as well

you can also switch the pathing to whatever path the humanoid is


Answer this question