You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Making player unable to move when jumping and keep it’s velocity moving
What is the issue? I don’t know how to do it
What solutions have you tried so far? Did you look for solutions on the Developer Hub?Yes
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
i recommended using the free fall state than using the jump state as a trigger
cuz once the player is falling they will still able to move cuz it didnt trigger the jump state
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.StateChanged:Connect(function(OldState, NewState)
if NewState == Enum.HumanoidStateType.Freefall then
Humanoid.WalkSpeed = 0
elseif NewState == Enum.HumanoidStateType.Landed then
Humanoid.WalkSpeed = game.StarterPlayer.CharacterWalkSpeed
end
end)
Try checking: ContextActionService
Idea: Maybe when u jump, unbind all moving actions (WASD), and once the character finished jumping you bind them all again