local t=5 local e=script.Parent.Parent.WalkPoints:WaitForChild("\049")local o=script.Parent.Parent.WalkPoints:GetChildren()script.Parent.Head.Weld.Part0=script.Parent.Head script.Parent.Head.Weld.Part1=script.Parent.FakeHead script.Parent.Torso.Neck.Part1=script.Parent.Head script.Parent.Torso.Neck.Part0=script.Parent.Torso script.Parent.Torso["\076\101\102\116 \072\105\112"].Part1=script.Parent["\076\101\102\116 \076\101\103"]script.Parent.Torso["\076\101\102\116 \072\105\112"].Part0=script.Parent.Torso script.Parent.Torso["\082\105\103\104\116 \072\105\112"].Part1=script.Parent["\082\105\103\104\116 \076\101\103"]script.Parent.Torso["\082\105\103\104\116 \072\105\112"].Part0=script.Parent.Torso script.Parent.Torso["\076\101\102\116 \083\104\111\117\108\100\101\114"].Part1=script.Parent["\076\101\102\116 \065\114\109"]script.Parent.Torso["\076\101\102\116 \083\104\111\117\108\100\101\114"].Part0=script.Parent.Torso script.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"].Part1=script.Parent["\082\105\103\104\116 \065\114\109"]script.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"].Part0=script.Parent.Torso function WeldClothes()local t=script.Parent:GetChildren()for e=1,#t,1 do if t[e].ClassName=="\080\097\114\116"and t[e].Name~="\070\097\107\101\072\101\097\100"then local o=t[e].Clothes:GetChildren()for R=1,#o,1 do local s=Instance.new("\087\101\108\100")s.Part0=t[e]s.Part1=o[R]local q=CFrame.new(t[e].Position)local J=t[e].CFrame:inverse()*q local U=o[R].CFrame:inverse()*q s.C0=J s.C1=U s.Parent=t[e]o[R].Anchored=false o[R].CanCollide=false end end end end WeldClothes()script.Parent.Torso.Touched:connect(function(t)if t.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then script.Parent.Torso.Anchored=true wait(.5)script.Parent.Torso.Anchored=false end end)wait(30)while true do for t=1,#o,1 do repeat script.Parent.Humanoid:MoveTo(script.Parent.Parent.WalkPoints[t].Position)wait(.5)until(script.Parent.Torso.Position-script.Parent.Parent.WalkPoints[t].Position).magnitude<=4 end wait(t)for t=1,#o,1 do repeat script.Parent.Humanoid:MoveTo(script.Parent.Parent.WalkPoints[(#o+1)-t].Position)wait(.5)until(script.Parent.Torso.Position-script.Parent.Parent.WalkPoints[(#o+1)-t].Position).magnitude<=4 end wait(t)end
--[[To use this script simply place the walk points where you want 
and the NPC will follow them.  will follow them first You can create as many points as needed
simply just duplicate a point and name it the next number in your line.

Note: DO NOT TOUCH ANYTHING ELSE IN THIS SCRIPT WITHOUT ASKING ME ~BigBoss(Raildex)
]]
local waitTime = 5 --This is the only thing you will need to change, it is the time he spends at the end of the points before going back the other way.

local waitPoint = script.Parent.Parent.WalkPoints:WaitForChild("1")
local points = script.Parent.Parent.WalkPoints:GetChildren()

script.Parent.Head.Weld.Part0 = script.Parent.Head
script.Parent.Head.Weld.Part1 = script.Parent.FakeHead
script.Parent.Torso["Neck"].Part1 = script.Parent.Head
script.Parent.Torso["Neck"].Part0 = script.Parent.Torso

script.Parent.Torso["Left Hip"].Part1 = script.Parent["Left Leg"]
script.Parent.Torso["Left Hip"].Part0 = script.Parent.Torso

script.Parent.Torso["Right Hip"].Part1 = script.Parent["Right Leg"]
script.Parent.Torso["Right Hip"].Part0 = script.Parent.Torso

script.Parent.Torso["Left Shoulder"].Part1 = script.Parent["Left Arm"]
script.Parent.Torso["Left Shoulder"].Part0 = script.Parent.Torso

script.Parent.Torso["Right Shoulder"].Part1 = script.Parent["Right Arm"]
script.Parent.Torso["Right Shoulder"].Part0 = script.Parent.Torso

function WeldClothes()
	local children = script.Parent:GetChildren()
	for i = 1, #children do
		if children[i].ClassName == "Part" and children[i].Name ~= "FakeHead" then
			local clothes = children[i].Clothes:GetChildren()
			for j = 1, #clothes do
				local W = Instance.new("Weld")
				W.Part0 = children[i]
				W.Part1 = clothes[j]
				local CJ = CFrame.new(children[i].Position)
				local C0 = children[i].CFrame:inverse() * CJ
				local C1 = clothes[j].CFrame:inverse() * CJ
				W.C0 = C0
				W.C1 = C1
				W.Parent = children[i]
				clothes[j].Anchored = false
				clothes[j].CanCollide = false
				--[[
				local Y = Instance.new("Weld")
				Y.Part0 = hit
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				Y.Parent = Y.Part0]]
			end
		end
	end
end
WeldClothes()

script.Parent.Torso.Touched:connect(function(part)
	if part.Parent:FindFirstChild("Humanoid") then
		script.Parent.Torso.Anchored = true
		wait(0.5)
		script.Parent.Torso.Anchored = false
	end
end)
wait(30)
while true do
	for i = 1, #points do
		repeat
			script.Parent.Humanoid:MoveTo(script.Parent.Parent.WalkPoints[i].Position)
			wait(0.5)
		until (script.Parent.Torso.Position - script.Parent.Parent.WalkPoints[i].Position).magnitude <= 4
	end
	wait(waitTime)
	for i = 1, #points do
		repeat
			script.Parent.Humanoid:MoveTo(script.Parent.Parent.WalkPoints[#points + 1 - i].Position)
			wait(0.5)
		until (script.Parent.Torso.Position - script.Parent.Parent.WalkPoints[#points + 1 - i].Position).magnitude <= 4
	end
	wait(waitTime)
end
