I have been trying to write a script on giving a part some AI. Then I wrote this code and the part didn't follow the path.
--Script Made By: Troloolooolooll
--Declaring Variables
local startPos = script.Parent.Position
local endPos = game.Workspace.End.Position
local box = script.Parent
local path = game:GetService("PathfindingService"):ComputeRawPathAsync(startPos, endPos, 200)
points = path:GetPointCoordinates()
for i = 1, #points do
box.Velocity = points[i]
end

1 comment
Your script changes box's Velocity to a coordinate point on line 11. You might want to change that.