NPC doesn't climb truss or walk up slope even with pathfinding links?

And i rather not just replace my script with this cause its a module script and it would be really tedious to set it up as its right now, other reason is this script of mine is an experiment, its not the actual script for the game

:joy: :joy:

okay, ill use your script give me a second

can u show us exactly where u put both of the attachment that the pathfinding link uses? some people put that attach directly above the ladder which is wrong, it should be placed on the next floor

forgive me if i assumed wrong

alright, you could try using the script i got and edit it so it works, i’d probably understand then

i removed the pathfinding links already, but no it wasnt above the ladder, dw about being wrong of ur assumption but it was on the “second floor”
like infront of the ladder but not ontop of it, like few studs away

1 Like

your local nextWaypoint was doing 1 waypoint so i changed it to the i variable in your

for i, Waypoint in Waypoints do

-- //Services
local PathfindingService = game:GetService("PathfindingService")

-- //Pathfinding
local Path = PathfindingService:CreatePath({
	AgentHeight = 2, 
	AgentRadius = 2, 
	AgentCanJump = true, 
	AgentCanClimb = true,
	WaypointSpacing = 4,
})

-- //NPC
local NPC = workspace:WaitForChild("NPC")

-- //Humanoid
local Humanoid = NPC:FindFirstChild("Humanoid")

-- //
local success, errorMessage = pcall(function(...)
	Path:ComputeAsync(NPC.PrimaryPart.Position, workspace.SpawnLocation.Position)	
end)


local Waypoints = Path:GetWaypoints()

local VisualSetting = false

while success do
	
	VisualSetting = true

	local nextWaypoint
	
	wait()

	if success or Path.Status == Enum.PathStatus.Success then
		for i, Waypoint in Waypoints do
			
			if VisualSetting then
				local Visual = Instance.new("Part")
				Visual.Size = Vector3.new(.5, .5, .5)
				Visual.Position = Waypoint.Position
				Visual.Parent = workspace
				Visual.Material = Enum.Material.Neon
				Visual.Shape = "Ball"
				Visual.Anchored = true
				Visual.Color = Color3.fromRGB(255, 255, 255)
				Visual.CanCollide = false
				Visual.CanQuery = false
				Visual.CanTouch = false
			end

			nextWaypoint = i
			Humanoid:MoveTo(Waypoints[nextWaypoint].Position)
		end
	end
	
	if not success then
		VisualSetting = false
		break -- //breaks while loop
	end
	
	
end

Have you tested the script because when i run it, it just makes the npc walk towards me without making a path, also yea i have set the variables to the correct ones

issue is on the next - you should do a table of all the positions you want it to go and then remove those positions if its gone to it

this should work, you made the visual part which works for me - and the npc walks to the spawnlocation. set the npc far away and watch it.

I recopied your script after you edited it, still does the same thing.

It walks to the spawn location without pathfinding, like just an entirely normal :MoveTo

thats how it works… you moved it to a path. Instead place the spawn like 50 studs up add a platform underneath it. then add a truss to climb it.

no like ill send a picture of what it does since a video isnt nessecary

image
the arrow is where it is walking to the white dots are obviously the path

it is trying to reach the spawnpoint but its not using pathfinding

basically its not using pathfinding to move

oh i see, yeh i js teste this give me a sec.

EDIT: still finding issue. give me some time

gonna be completely honest i have no solution.

i read this and its meant to work but i think their pathfindinglinks dont work.

Yea I have no idea why this is happening, hopefully someone else will find the solution or even you.

1 Like

imma report it as a bug and they will check

1 Like