-
What do you want to achieve?
I want to make a pathfinding NPC. -
What is the issue?
It just stands there in place when the obstacle is higher than 6.5 studs, even though the jump power is set to be able to jump above that.
6.5:
https://gyazo.com/e6288527e9ee77bdbe046cf71eac5419
7:
https://gyazo.com/da99e7c2bbb0f34ba3254358813b0769
-
What solutions have you tried so far?
I tried changing the agent parameters, it doesn’t seem to be working.
I tried to change the HumanoidRootPart size, doesn’t work as well.
I tried even setting the HipHeight on 100 and what would you know, it didn’t work too.
local PathfindingService = game:GetService("PathfindingService")
local Humanoid = script.Parent.Humanoid
local RootPart = script.Parent.HumanoidRootPart
local Goal = game.Workspace.Goal.Position
local Path = PathfindingService:CreatePath()
Path:ComputeAsync(RootPart.Position, Goal)
local Waypoints = Path:GetWaypoints()
for i, Point in ipairs(Waypoints) do
Humanoid:MoveTo(Point.Position)
if Point.Action == Enum.PathWaypointAction.Jump then
Humanoid.Jump = true
end
Humanoid.MoveToFinished:Wait()
end
Humanoid:LoadAnimation(script.Chase):Play()
How can I make the NPC be able to jump above obstacles that the jump power can handle?
Thanks for reading.