i'm making a game kinda like tower defense simulator where zombies follow a winding path
however, the zombie only moves once and doesn't turn and continue
here's the script:
for i, v in pairs(game.Workspace.Path:GetDescendants()) do if v:IsA("Part") then script.Parent.Torso.AlignPosition.Attachment1 = v.ZPos repeat wait() until script.Parent.HumanoidRootPart.Position == v.Position script.Parent.Torso.AlignOrientation.Attachment1 = v.ZRot end end
Maybe the position isnt exactly the same. Try checking for if the distance is close but not exact. Try using
Distance = (part1.pos - part2.pos).magnitude
Hope this helps :3