Our npc’s doesn’t move. I leave a video here. At first, it’s just worked I don’t know why. But at second time you can see problem. To simplify problem I delete all accessories and body parts except torso and legs. Still not moving. Then I delete legs and only torso left and it starts moving.
parts aren’t anchored. Is it something related with motor6d settings?
not sure if matters and think its obvious but i give coordinates of related ores in the wall. This is the code
local path = PathfindingService:CreatePath({
AgentRadius = 1,
AgentHeight = 5,
AgentCanJump = true,
})
path:ComputeAsync(rootPart.Position, targetPos)
if path.Status == Enum.PathStatus.Success then
local waypoints = path:GetWaypoints()
for i, waypoint in ipairs(waypoints) do
local marker = Instance.new("Part")
marker.Size = Vector3.new(0.5, 0.5, 0.5)
marker.Shape = Enum.PartType.Ball
marker.Material = Enum.Material.Neon
marker.Color = Color3.fromRGB(0, 255, 0)
marker.Anchored = true
marker.CanCollide = false
marker.CFrame = CFrame.new(waypoint.Position)
marker.Parent = workspace
if i > 1 then
local prevPos = waypoints[i - 1].Position
local distance = (prevPos - waypoint.Position).Magnitude
local line = Instance.new("Part")
line.Anchored = true
line.CanCollide = false
line.Material = Enum.Material.Neon
line.Color = Color3.fromRGB(255, 255, 0)
line.Size = Vector3.new(0.1, 0.1, distance)
line.CFrame = CFrame.new(prevPos:Lerp(waypoint.Position, 0.5), waypoint.Position)
line.Parent = workspace
end
end
-- 🔹 NPC hareketi
for _, waypoint in ipairs(waypoints) do
humanoid:MoveTo(waypoint.Position)
if waypoint.Action == Enum.PathWaypointAction.Jump then
humanoid.Jump = true
end
humanoid.MoveToFinished:Wait()
print("waypoint check")
end
else
warn("No way!")
humanoid:MoveTo(targetPos)
end
