So I have a script that moves every npc from node0 to node12. Here is the script:
function move(Entity)
for i, v in pairs(nodes:GetChildren()) do
Entity.Humanoid:MoveTo(v.Position)
Entity.Humanoid.MoveToFinished:Wait()
end
end
This script works completely fine. However, it only works for a walkspeed larger than 4, if the npc’s walkspeed is slower than 4, it ignores the nodes and walk out of the path like this:
( as you can see, the npc with the neon lights walk on the path, however, the npc up there with green torso walks OUT of the path )
It is very weird as the walking script is the same, and the nodes positions are not changed.
here is the npc walking script ( which should be fine ):
local humanoid = script.Parent.Humanoid
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://8433662254"
local loadedAnim = humanoid:LoadAnimation(animation)
loadedAnim:Play()
loadedAnim.Looped = true
humanoid.WalkSpeed = 3
loadedAnim:AdjustSpeed(0.5)
humanoid.MaxHealth = script.Parent.Health.Value
here are the nodes position:
I really need help, thanks!


