Is it me or does pathfindingservice cause memory leaks and lag?
i believe that i can’t really fix this problem with enemy AI in my game
I’ve tried reducing the computing interval, creating the path object once, destroying the path object when it’s not needed anymore, dereferencing the object. Server Performance problems still persist and are very severe. when about 12 enemies are on the map, the server fps goes down to 20 fps or even 5 in some cases
Simple path is really laggy and buggy, also the author doesn’t care much for it anymore. PathfindingService doesn’t make memory leaks, so I’m afraid it’s your code
If your trying to make really smart ai. For a bot that is just a very common enemy its not worth doing. The reason why horror games have very complicated bots is because there is only one of them.
a game about defending a base from waves of enemies
I’m pretty sure the loops stop when the enemy for instance, dies https://create.roblox.com/dashboard/creations/store/16180249330 the actual ai script is here
Plus the way the memory leaks presents itself is it will after a random amount of time, usually 10 minutes spike up from 1,000 megabytes to 2000 in an instant
Without any code to check, there’s no way to say what the exact problem is. If you could upload the code here or a place demo file we’d probably give you better feedback. Otherwise it’s just guessing and checking.
The link you gave is a private link. We cannot see it or access it.