I am trying to make a AI pathfinder got to different objects other than a Torso, I have tried different things, but they haven't worked, this is the Torso section:
while true do
wait(math.random(1,5))
local target = findNearestTorso(script.Parent.Torso.Position)
if target ~= nil then
script.Parent.Humanoid:MoveTo(target.Position, target)
end
end
I have tried changing the findNearestTorso to different things but that hasn;t worked, I am trying to make it go a part in the workspace called GOAL. I have tried:
local target = game.Workspace.GOAL.Position
But that didn't work, either.
