Humanoid:MoveTo() doesn’t work at the beggning , and when i get closer to the NPC it starts moving , after a minute or so the lag stops and the NPC Moves normally
This may not sound like an issue but when there’s multiple NPCs it takes longer for the issue to stop ( up to 5 Minutes )
Here’s a video of the issue :
and this is My script :
local Players = game:GetService("Players")
local NPC = workspace:WaitForChild("NPC")
local RunService = game:GetService("RunService")
local plr = Players.LocalPlayer
local char = plr.Character
local CharCFrame = CFrame.new(0,0,0)
RunService.Stepped:Connect(function()
if char.PrimaryPart.CFrame ~= CharCFrame then
CharCFrame = char.PrimaryPart.CFrame
NPC.Humanoid:MoveTo((CharCFrame*CFrame.new(0,0,5)).Position)
end
end)```