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.

4 comments
That look part won't follow the humanoid because you didn't do anything with that part in Touched event. I'm not really sure what you want to do but I suggest parenting the part to a model where humanoid is parented when Touched event is fired on that part.
What is that part and what are you trying to do?
This part is for the enemy find player then start card fight.
To g1o2r3d4a5n6: i want make it follow npc, but i don't know how and i can't find it.