Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to get performace-friendly followers?

Asked by 10 years ago

Basically, I'm trying to make Humanoid models that follow players. My problem is that I can't figure out a way to get these followers to follow without causing lag once a bunch of them have spawned. Right now I'm looping MoveTo(player.Torso.Position) twice per second, but it gets quite slow after awhile. Is there a way to continually follow without causing much lag?

I'm not requesting a script, just a method of accomplishing this.

Thanks! --MightyWanderer

1 answer

Log in to vote
0
Answered by 10 years ago

You could make the loop go slower until a player is in range. Then speed it up. You can also greatly improve performance by making a single script iterate through all of the Humanoid models to move them instead of a script in each model.

Ad

Answer this question