local R=script.Parent local l=script.Animation1 local M=script.RunAnim local U=R.AI:LoadAnimation(l)local E=R.AI:LoadAnimation(M)U:Play()U.Looped=true script.Parent.HitBox.Script.Enabled=false model=script.Parent.Parent hum=script.Parent.AI torso=script.Parent.Torso while true do wait(math.random(5,7))if model.PointA~=nil then a=model.PointA hum:MoveTo(a.Position,a)U:Stop()script.Parent.Head["\083\099\097\114\121 \083\099\114\101\097\109"]:Play()script.Parent.HitBox.Script.Enabled=true E:Play()repeat wait(.1)wait(6)script.Parent.Parent:Destroy()until(a.Position-torso.Position).magnitude<=5 else print("\078\111 \080\111\105\110\116 \065\046")end end
--[[
		Walking NPCs
All points (Point A, B, C, D, and E) must be inside of the model.
You should be able to edit the NPC's looks.
Simply keep the Humanoid, animate, Walk, Head, Torso, and (I think) the legs.
The NPC should  be grouped with the Points
]]
--

local npc = script.Parent

local idleanim = script.Animation1
local runanim = script.RunAnim

local idleanimtrack = npc.AI:LoadAnimation(idleanim)
local runanimtrack = npc.AI:LoadAnimation(runanim)

idleanimtrack:Play()
idleanimtrack.Looped = true
script.Parent.HitBox.Script.Enabled = false

model = script.Parent.Parent
hum = script.Parent.AI
torso = script.Parent.Torso
while true do
	wait(math.random(5, 7))
	if model.PointA ~= nil then
		a = model.PointA
		hum:MoveTo(a.Position, a)
		idleanimtrack:Stop()
		script.Parent.Head["Scary Scream"]:Play()
		script.Parent.HitBox.Script.Enabled = true
		runanimtrack:Play()
		repeat
			wait(0.1)
			wait(6)
			script.Parent.Parent:Destroy()

		until (a.Position - torso.Position).magnitude <= 5
	else
		print("No Point A.")
	end
end
