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

Can i spin parts using a LocalScript to prevent lag?

Asked by 4 years ago

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?

0
use a localscript in startergui that way only the player sees it greatneil80 2647 — 4y
0
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. zone_cboat 52 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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.

0
What do you mean when you say "Add a value"? FrankyLovesGames 35 — 4y
Ad

Answer this question