Whenever i try to run my script it outputs this "13:52:44.021 - Workspace.NPC.Script:9: function arguments expected near 'for'" Here is my script:
local torso = script.Parent.Torso
local base = workspace.Base.Position
local humanoid = script.Parent.Humanoid
local path = game:GetService("PathfindingService"):FindPathAsync(torso,base)
local points = path:GetWaypoints
for i,v in pairs(points) do
local p = Instance.new("Part",workspace)
p.Anchored = true
p.CanCollide = false
p.CFrame = CFrame.new(v.Position)
p.Size = Vector3.new(1,1,1,)
end
if path.Status == Enum.PathStatus.Success then
for i,v in pairs(points) do
human:MoveTo(v.Position)
human:.MoveToFinished:wait()
if v.Action == Enum.PathWaypointAction.Jump then
humanoid.Jump = true
end
end
end

8 comments
Thanks but now its a new problem xd now it says "14:20:41.344 - Workspace.NPC.Script:14: unexpected symbol near ')'"
p.Size = Vector3.new(1,1,1,) Should be p.Size = Vector3.new(1,1,1) Try it now :)
Thanks this script hates me xddd now it says "14:23:04.722 - Workspace.NPC.Script:20: function arguments expected near ':'" im so sorry lol thanks so much for your help
Yes, look at the original answer, change human:.MoveToFinished:wait() to human.MoveToFinished:wait() That should do it.
Thanks this script must hate me now it says " 14:25:37.352 - Unable to cast Instance to Vector3"
Try adding .Position at the end of line 1.
Thanks so much now it works :D
Np.