Pathfinding service roblox

Hello everyone! So I made a unique game. Where you make an obby and a bot plays it not the player.So I have to ask something about this.The bot is not jumping even if the jump function for the bot is included.

local torse = script.Parent.LowerTorso
local pathservice = game:GetService("PathfindingService")

game.Workspace.RoundStats.Changed:Connect(function()
    if workspace.RoundStats.Value == true then
        local path = pathservice:CreatePath()
        path:ComputeAsync(script.Parent.HumanoidRootPart.Position,game.Workspace.endpoint.Position)
        local waypoints = path:GetWaypoints()
        for i,v in pairs(waypoints) do
            if v.Action == Enum.PathWaypointAction.Jump then
                human:ChangeState(Enum.HumanoidStateType.Jumping)
            end
            local part = Instance.new("Part",workspace)
            part.Size = Vector3.new(0.5,0.5,0.5)
            part.Anchored = true
            part.CanCollide = false
            part.Material = Enum.Material.Neon
            part.BrickColor = BrickColor.new("White")
            part.Position = v.Position + Vector3.new(0,1.5,0)
            human:MoveTo(v.Position)
            human.MoveToFinished:Wait(2)
        end
        if path.Status == Enum.PathStatus.Success then
            game:GetService("Chat"):Chat(script.Parent.Head,"so easy")
        else
            game:GetService("Chat"):Chat(script.Parent.Head,"aww its so hard")
        end
    end
end)

Yeah so anyone knows how to fix it? or is it a roblox bug which occurs sometimes

3 Likes

I think you should use human.Jump = true instead.

Well, one question. How far apart are the platforms from each other. As in how far does one need to jump in your obby? A pathfindimg npc cannot jump as far as a normal player.

1 Like

he has to jump 3 studs high :confused:

oh but does that work.i don’t think so because its a humanoid

Can you just click that link xd? It explains how jump works, I want to know how it works.

like how to make humanoid jump

There is written that when Humanoid.Jump is set to true it will cause the Humanoid to jump.

1 Like

Ok thanks! It worked and its working in private servers to.