I’ve looked in literally every post i seen yet nobody spoken about it before, could be a bug?
local PathfindingService = game:GetService("PathfindingService")
local folder = workspace:WaitForChild("e")
local start = folder:WaitForChild("Start")
local marker = folder:WaitForChild("Point")
local goal = folder:WaitForChild("goal")
local path = PathfindingService:CreatePath()
local fr= path:ComputeAsync(start.Position,goal.Position)
print(fr)
i suspect that roblox force my roblox studio to toggle random beta feature without my knowledge
Otherwise it could be a bug.Thanks all for trying to help but next time please look at attachments
:ComputeAsync() not returning anything isn’t a bug. As previously explained by @CloudSnooze:ComputeAsync() doesn’t return anything on purpose and instead computes a created paths waypoints. To actually get the paths waypoints you have to call :GetWaypoints() on the path you made using :CreatePath().
Doesn’t work as :ComputeAsync() only computes a path and does not return its waypoints:
local PathfindingService = game:GetService("PathfindingService")
local folder = workspace:WaitForChild("e")
local start = folder:WaitForChild("Start")
local marker = folder:WaitForChild("Point")
local goal = folder:WaitForChild("goal")
local path = PathfindingService:CreatePath()
local fr= path:ComputeAsync(start.Position,goal.Position) --Doesn't return anything
print(fr)
The correct implementation would look like this:
local PathfindingService = game:GetService("PathfindingService")
local folder = workspace:WaitForChild("e")
local start = folder:WaitForChild("Start")
local marker = folder:WaitForChild("Point")
local goal = folder:WaitForChild("goal")
local path = PathfindingService:CreatePath()
path:ComputeAsync(start.Position,goal.Position) --Computes the path and doesn't return anything
local fr = path:GetWaypoints() --Actually returns the previously computed waypoints
print(fr)
If you need any additional help you can refer to the official documentation on paths: