#humanoid:ChangeState(Enum.HumanoidStateType.Jumping) DOES NOT WORK!!! (mid-air)

1 messages · Page 1 of 1 (latest)

shy ore
#

I am making a climbing game where the player has to hold on to holds to climb. Once the player grabs one and presses jump, the code is supposed to make them jump out, but currently, it just drops them. This is a section of my server-side code. The only issue is that my character doesn't jump.

    -- Apply boost
    if humanoid.MoveDirection.Magnitude == 0 then
        humanoid.JumpPower = JUMPS[3]
        humanoid.WalkSpeed = SPEEDS[1]
    else
        humanoid.JumpPower = JUMPS[1]
        humanoid.WalkSpeed = SPEEDS[3]
    end
    -- Unfreeze
    humanoid.AutoRotate = true -- I don't think this is necessary but it doesn't matter rn
    char.HumanoidRootPart.Anchored = false -- That's how I hold my guy mid-air
    hrp.AssemblyLinearVelocity = Vector3.new(0, 0, 0) -- Reset speed that might have been building up
    task.wait()
    humanoid:ChangeState(Enum.HumanoidStateType.Jumping) -- BRO JUMP PLEASE

    -- Reset boost
    task.delay(BOOST_DURATION, function()
        humanoid.JumpPower = JUMPS[2]
        humanoid.WalkSpeed = SPEEDS[2]
    end)
shy ore
#

Update: I've tried directly setting humanoid.Jump to true and giving more time in the wait, but it didn't fix anything.

forest bay
#

while true do

shy ore
#

Doesn't work

#

Also tried for loops

#

The guy doesn't want to jump