Basically, I have a cutscene where 3 NPCs are chatting, and during which, they hear a noise, and then run out of view, then get destroyed ( :Destroy() ), however, they do not move, but instead just stand in place and then get destroyed.
0 errors occur yet they don’t even move an inch any reason why?
Code
function module.Function()
wait(1)
script.Parent.Parent:FindFirstChild("39").Scene.Objects:FindFirstChildOfClass("Model").Humanoid:MoveTo(Vector3.new(58.862, 26.23, 984.257))
wait(2)
script.Parent.Parent:FindFirstChild("39").Scene.Objects:FindFirstChildOfClass("Model"):Destroy()
end
I’d suggest checking if both: A: There’s no anchored parts in the NPCs or any anchored parts connected to them that may be keeping them in place. B: Their walkspeed isn’t 0.
If none of those work, my only other suggestions would be to check if the Vector3 you’re using isn’t already in the same location as they’re standing, see to it that the function you’re using is actually being called properly and going through, or make sure the code is referring to the NPC in question.
Otherwise, it’d have to be one of the problems I’ve already mentioned.
If there’s any place in the code aside from the function you’re showing us, check if it is indeed changing a property that would force them to stand still.
here is the full code of that module script - but there is a bunch more information on a server script I have:
Full Code
local module = {}
local e = game.ReplicatedStorage.Events
local RE = e.RemoteEvent
function module.Run()
local Dialog = "RUNNNNNNN!!!!!!";
local CameraCFrame = script.Parent:FindFirstChildOfClass("Part");
local Functions = true;
local Time = 6.5;
local WaitForPlayers = true;
local FOV = 70;
return Dialog, CameraCFrame, Functions, Time, WaitForPlayers, FOV
end
function module.Function()
wait(1)
script.Parent.Parent:FindFirstChild("39").Scene.Objects:FindFirstChildOfClass("Model").Humanoid:MoveTo(Vector3.new(58.862, 26.23, 984.257),game.Workspace.MoveToOwner)
wait(2)
script.Parent.Parent:FindFirstChild("39").Scene.Objects:FindFirstChildOfClass("Model"):Destroy()
end
function module.WaitForPlayers()
end
return module