so this is broken now apparently
correct, i have done everything correct as show - and its meant to work.
local module = {}
-- //Services
local PathfindingService = game:GetService("PathfindingService")
-- //Pathfinding
local Path = PathfindingService:CreatePath({
AgentRadius = 2,
AgentHeight = 2,
AgentCanJump = true,
AgentCanClimb = true,
WaypointSpacing = 5,
Costs = {
Kill = 20,
Collide = math.huge,
}
})
-- //Folders
local Obby = workspace:WaitForChild("Obby")
local Values = script.Parent.Parent.Parent:FindFirstChild("Values")
-- //Parts
local Part = Obby:FindFirstChild("End")
-- //Values
local hasStarted = Values:FindFirstChild("hasStarted")
local hasFinished = Values:FindFirstChild("hasFinished")
local TimeCount = Values:FindFirstChild("TimeCount")
-- //Models
local Rig = workspace:WaitForChild("Rig")
function module:Path(player, character)
-- //RigHumanoid
local RigHumanoid = Rig:FindFirstChild("Humanoid")
hasStarted.Changed:Connect(function(value: boolean)
if value == true then
local success, errorMessage = pcall(function()
Path:ComputeAsync(Rig.PrimaryPart.Position, Part.Position)
end)
if success and Path.Status == Enum.PathStatus.Success then
RigHumanoid:MoveTo(Part.Position)
else
warn("Unable to read path.")
end
end
end)
end
return module
all i get is my warn(“Unable to find path”)