while true do
path = game:GetService("PathfindingService"):ComputeRawPathAsync(game.Workspace.Start.Position, game.Workspace.Finish.Position, 512)
points = path:GetPointCoordinates()
game.Workspace.Points:ClearAllChildren()
for i=1, #points do
part = Instance.new('Part')
part.Size = Vector3.new(1,1,1)
part.FormFactor = Enum.FormFactor.Symmetric
part.CanCollide = false
part.Position = points[i]
part.Anchored = true
part.Parent = game.Workspace.Points
end
wait(0.1)
end
my roblox studio crashes when i use this script. everytime i try to move my finish to a different position or add a part my studio crashes. why?

1 comment
Doesn't crash when I use it.