📜  在玩家 roblox 旁边移动对象:moveto() - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:13.999000             🧑  作者: Mango

代码示例1
local npc = script.Parent
local target = v.Character.HumanoidRootPart.Position
local maxDistance = 20

npc.Humanoid:MoveTo(target - CFrame.new(npc.HumanoidRootPart.Position, target).LookVector * maxDistance)