What’s more efficient and less likely to cause lag?
Local loop that fires a remote function ever 0.05 seconds
Server loop that runs until it is told not to and is running every 0.05 seconds
I’m pretty sure locally is better, since I just tried a test with 16 dummies each with its own while loop running at wait(0.05) and the script performance showed more than 2% activity, which is not good apparently.
Let’s take a step back here. What are you doing that requires a loop running every 1/20th of a second. Usually your code doesn’t need to run unreasonably fast, and the intervals can be bigger. Invoking a remote function isn’t very smart either especially every 1/20th a second.