while true do
task.wait()
for ind,node in ipairs(orderNodes) do
for i = 0,1,0.05 do
local targetPosition = self.Model.PrimaryPart.CFrame:Lerp(node.CFrame,i).Position
local targetCFrame = CFrame.lookAt(targetPosition,node.Position)
self.Model.PrimaryPart.CFrame = self.Model.PrimaryPart.CFrame:Lerp(targetCFrame,i)
print("moving with node: ",node.Name)
RunService.Heartbeat:Wait()
end
currentNode = ind
if ind+1 > #orderNodes then continue end
end
end
1 Like
First - make sure it’s not in a local script since it can be easily abused by just having a good computer
Second - try to get rid of task.wait()
on a third line. Bc of your low fps, having RunService.Heartbeat:Wait()
and task.wait()
back to back results in a 2 frame pause between nodes, which is in your case ~0.1 second of a pause
1 Like
The solution was in lerping node to node rather than the cars cframe to the node
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.