I dont know how to get the instance of a path label.
I have a door and inside i placed pathfinding Modifier and set its label ro “Door” but my script doesnt work. sometimes it prints nil other times it doenst print at all
local function Move(pos: Vector3)
path:ComputeAsync(Character.HumanoidRootPart.Position,pos)
if path.Status ~= Enum.PathStatus.NoPath then
local points = path:GetWaypoints()
if points and points[3] then
if path:GetWaypoints()[3].Label == "Door" then
print(path:GetWaypoints()[3].Label.Instance) -- prints nil
end
Character.Humanoid:MoveTo(points[3].Position)
--Character.Humanoid.MoveToFinished:Wait()
--v.Humanoid.MoveToFinished:Wait()
end
end
end