MoveTo isn't work in my model

--SCRIPT TEST  its not my finally script



local RunService = game:GetService("RunService")

local Model = workspace.Model
local ModelHumanoid = Model.Humanoid

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character.HumanoidRootPart:: BasePart


local function onHeartbeat(dt: number)
	local distance = (Model.HumanoidRootPart.Position - humanoidRootPart.Position).Magnitude
	
	if distance <= 50 then
		Model.HumanoidRootPart.CFrame:Lerp(humanoidRootPart.CFrame, 1)
	end
end

RunService.Heartbeat:Connect(onHeartbeat)

image
image

thankssss

Try using this:

Model:PivotTo(humanoidRootPart.CFrame) 

NOOO i’m sorry i set not good script, but i remplace this part for

ModelHumanoid:MoveTo(HumanoidRootPart.Position)

but PivotTo set cframe in model its not my objective

Oh you’re trying to make the npc chase the player?

Yeahhh !! its trueeee (i add many letters for publish my post lol)

You’ll have to learn how to path find. Here are some resources:

I personally watched the video when I learned how to pathfind and i found it to be useful