I have somewhat successfully scripted a car AI node system that’s fairly simple however I’ve ran into an issue that seems beyond my control: Every time the car is tweened to a node, the car pauses and tweens again. Im not sure why this is happening even though the delay time is 0 in my tween info.
function Vehicle.Dismiss(Car)
if Car then
local CurrentNode = Car.CurrentNode
Vehicle.UpdateNode(Car, Nodes["2"])
task.spawn(function()
while true do
local NextNode = Nodes[tostring(tonumber(CurrentNode.Value.Name) + 1)]
print(NextNode)
Vehicle.UpdateNode(Car, NextNode)
if not Nodes:FindFirstChild(NextNode) then
Vehicle.Discard(Car)
break
end
end
end)
end
end
Im also using a custom module to tween it on all clients instead of the server. Yes I already tried doing tweenservice on the server if you think that’s the solution. The exact same thing happens.