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)