I made a npc,and he has a part.
But when the npc moves,the part won't move...
I want to know how to make it. Thanks!
My codes:
local Noob = script.Parent local Look = Noob.Part Look.Touched:connect(function(otherPart) if otherPart.Parent.PlayerScript ~= nil then --something happened end end)
Yes that part i named Look
,When the player touched Look
,it will make something happened.
But Look
won't follow npc when he is patrolling.
PatrollingScript:
while true do script.Parent.Humanoid:MoveTo(workspace.Part.Position) script.Parent.Humanoid.MoveToFinished:wait() script.Parent.Humanoid:MoveTo(workspace.Part1.Position) script.Parent.Humanoid.MoveToFinished:wait() end
There are two scripts.
Thanks!
By the way, the part is in front of npc.