How do I make an NPC that mimics your every move?

So I make an NPC that follows you, again, like in FE2 with its Rescue Mission mechanic.

So far I got it to move the arms and legs and stuff, but its super choppy and I am wondering how to make it smoother?
Try it out somewhere, it’s a local script.
All you need is a dummy.

while wait() do
		Escapee:FindFirstChild("Head").Position = plr.Parent:FindFirstChild("Head").Position
		Escapee:FindFirstChild("HumanoidRootPart").Position = plr.Parent:FindFirstChild("HumanoidRootPart").Position
		Escapee:FindFirstChild("Left Arm").Position = plr.Parent:FindFirstChild("Left Arm").Position
		Escapee:FindFirstChild("Left Leg").Position = plr.Parent:FindFirstChild("Left Leg").Position
		Escapee:FindFirstChild("Right Arm").Position = plr.Parent:FindFirstChild("Right Arm").Position
		Escapee:FindFirstChild("Right Leg").Position = plr.Parent:FindFirstChild("Right Leg").Position
		Escapee:FindFirstChild("Torso").Position = plr.Parent:FindFirstChild("Torso").Position
		Escapee:FindFirstChild("Head").Orientation = plr.Parent:FindFirstChild("Head").Orientation
		Escapee:FindFirstChild("HumanoidRootPart").Orientation = plr.Parent:FindFirstChild("HumanoidRootPart").Orientation
		Escapee:FindFirstChild("Left Arm").Orientation = plr.Parent:FindFirstChild("Left Arm").Orientation
		Escapee:FindFirstChild("Left Leg").Orientation = plr.Parent:FindFirstChild("Left Leg").Orientation
		Escapee:FindFirstChild("Right Arm").Orientation = plr.Parent:FindFirstChild("Right Arm").Orientation
		Escapee:FindFirstChild("Right Leg").Orientation = plr.Parent:FindFirstChild("Right Leg").Orientation
		Escapee:FindFirstChild("Torso").Orientation = plr.Parent:FindFirstChild("Torso").Orientation
end

Well, using while wait() do usually has a small wait period, try using render stepped instead.

Nice! it’s way smoother, but now I have another problem, I need it to follow the player and not be in the exact position, like, for example, 2 studs behind in any direction.
Could you maybe help with that too?

Nevermind, found it out, thanks a bunch for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.