#Pathfinding being weird
1 messages · Page 1 of 1 (latest)
This is my script;
local PathfindingService = game:GetService("PathfindingService")
local SCP = script.Parent
local Humanoid = SCP.Humanoid
local hrp = SCP.HumanoidRootPart
local Point = game.Workspace.waypoint
local Path = PathfindingService:CreatePath({
AgentRadius = 1,
AgentHeight = 1,
})
Path:ComputeAsync(hrp.Position, workspace.waypoint.Position)
if Path.Status == Enum.PathStatus.Success then
local waypoints = Path:GetWaypoints()
for i, waypoint in waypoints do
local p = Instance.new("Part", workspace)
p.Position = waypoint.Position
p.Anchored = true
p.Material = Enum.Material.Neon
p.CanCollide = false
p.Size = Vector3.new(1,1,1)
end
for i, waypoint in waypoints do
Humanoid:MoveTo(waypoint.Position)
Humanoid.MoveToFinished:Wait()
end
else
warn("Path not computed")
end
This is where the script is.
Can anybody help me with this?
Humanoid.MoveToFinished:Wait()
no wonder you're having issues
I was watching a video because I found that easier to understand. And they used the exact same script and it worked.
But thanks.
bruh you can dulicapte the part connect to over other make it look u shape
What?