So, I am trying to make an NPC walk from one place to another then disappear then randomly spawn another in, for the walk script I am using the following code:
local NPC = game.Workspace.Test -- (Change "Test" to your NPC name)
while true do
wait(1) -- (Change the number to how long you want your npc to stop)
NPC.Humanoid:MoveTo(game.Workspace.Point1.Position)
NPC.Humanoid.MoveToFinished:Wait()
change "Point1" in the script into the name of your part.
copy this:
wait(1)
NPC.Humanoid:MoveTo(game.Workspace.Point1.Position)
NPC.Humanoid.MoveToFinished:Wait()
end
However, Roblox is saying a few error messages And I am unsure on how to make the NPC disappear and regenerate a new avatar. Does anybody have any answers?

3 comments
tell us the errors shown plus u should prolly use ur own code cuz this doesnt look like its urs
In addition, I would also like them to stop at a certain time, so when it signals a light then they will stop moving or something.
It is not my own code I am using it from a model that I found an edited, my errors say "incomplete statement" and expected assignment or a function call