Hi! I’ve been working on Pathfinding for the first time, and it was going well. Although, somehow when I start the game, the NPC now flies around everywhere with absolutely no clothes or anything. I know somethings wrong here because it’s supposed to wait 4 seconds before doing anything. Here’s an example as a GIF;
Here’s my code to help you as well,
wait(4)
-- Variables for the zombie and its humanoid
local npc = game.Workspace.Welcomer
local humanoid = npc.Humanoid
-- Variables for the point(s) the zombie should move between
local ofnum = 0
local start = game.Workspace.StartPoint
local destination2 = game.Workspace["Office"..ofnum+1]
-- Move the zombie to the primary part of the green flag model
humanoid:MoveTo(start.Position)
-- Wait until the zombie has reached its first target
humanoid.MoveToFinished:Wait()
-- Move the zombie to the primary part of the purple flag model
humanoid:MoveTo(destination2.Position)
-- Wait until the zombie has reached its first target
humanoid.MoveToFinished:Wait()
-- Move the zombie to the primary part of the purple flag model
humanoid:MoveTo(start.Position)
-- Move the zombie to the primary part of the purple flag model
humanoid:MoveTo(destination2.Position)
How about how the character is spawning? Try just running the game from the server instead of playing it like normal, and keep track of the NPC while doing it.
I can definitely tell that your script isn’t the culprit if the source you provided is all it is, because waiting 4 seconds in the main thread should keep the NPC in its default state of standing up and doing nothing, with clothes on, for 4 seconds.
Does disabling the script do anything, or putting the NPC in ServerStorage first?
Are there any hidden scripts doing the dirty work?