local Molly = script.Parent local humanoid = Molly.Humanoid local PathfinderServise = game:GetService("PathfindingService") local function getPath(destination) local pathParams = { ['AgentHeight'] = 6, ['AgentRadius'] = 2, ['AgentCanJump'] = false } local path = PathfinderServise:CreatePath(pathParams) path:ComputeAsync(Molly.HumanoidRootPart.Position, destination.Position) return path end local function walkTo(destination) local path = getPath(destination) for index, waypoint in pairs(path:GetWaypoints()) do humanoid:MoveTo(waypoint.Position) humanoid.MoveToFinished:Wait() end end local function patrol() local waypoints = workspace:GetChildren() local randomNum = math.random(1, #waypoints) walkTo(waypoints[randomNum]) end while wait(2) do patrol() end
You can't use Position at a model you have to use :MoveTo()
Position isnt a property of a model. Since there is multiple parts in a model so you would have to use :MoveTo()