Currently, in the process of making my game. Every spinning object stops once in a while as the server lags too much. How could i make a local script that spins every part on the client only?
✓ ANSWER ACCEPTED
Can i spin parts using a LocalScript to prevent lag?
1 answer
✓ Accepted answer
There are a couple ways of doing this. You can use Collections Service to tag any rotating parts, add a value to the rotating parts, or put them in a group or folder. Then loop through the objects in the workspace if you are using tags or values, or loop through the folder if you use that method. Do this all in one while wait() loop instead of multiple scripts. You could even do this on the server, this wouldn't cause much server stress.
1 comment
0
What do you mean when you say "Add a value"?
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
use a localscript in startergui that way only the player sees it
They should use StarterPlayerScripts, but they could use StarterGui, also I believe they were asking how to make the script, not how to make it local.