Hello, currently I’m trying to make an instance follow a set path (Through waypoints), but, it isn’t following the points as it should.
Expected result: The instance should follow the points in order, so if there are 4 points, it would go from point 1 to point 2, up until the last point, then go to the exit part.
Actual result: The instance goes to point 1 as normal, then immediately goes towards the exit, then to the last point, then back to the exit.
As of now, I tried adding debounces and checking what point it is currently at, ensuring it’s not at the last one yet, and the outcome remained the same.
elseif dest.Name == "Point" then
local CurDest = dest
for _,v in pairs(CurDest.Parent:GetDescendants()) do
if v.Name == "PointID" and v.Value == CurDest.PointID.Value + 1 then
dest = v.Parent
-- print(v.Value)
DB = true
ConvergeToPoint(dest)
else
dest = CurDest.Parent.Parent.Exit
--print(dest)
DB = true
ConvergeToPoint(dest)
end
end
end
I’d appreciate any kind of help, because from where I’m looking, this should work properly, yet it doesn’t…