How can I prevent zombies in my tower defense game from stopping for half a second at each point they go to?

It works well on my normal enemies, but I have a giant boss and it just skips a lot of the path. Is it because of it’s speed or something?

This thing can happen because the script takes node depending on their order in the folder

So putting numbers at the end of them doesn’t really make a difference?

I’m not sure about this but I think it is

I will give you a better way

Alright. Tell me when you finish it.

Now go to the nodes folder and rename the nodes starting with number 1

Example of the first step, name it 1 next step 2 etc

and replace the loop function to

for i = 1, #nodes do
	local FindNode = game.Workspace.Path1:FindFirstChild(i)
	
	moveTo(FindNode.Position)
	
	repeat
		wait()
	until targetReached
end

Please never repeat wait() it’s so incredibly inefficient and random. If you’re going that route use a custom wait function.

To answer the question:
I use distance/walkspeed - 0.05 with a custom wait function and there is no stuttering, but I also have a custom path-follow handler too.

3 Likes