How can I script something to lower lag?

I don’t know if this is the right topic or not

I get these a lot, people ask me to just help quickly with there game lag, I volunteer assuming it will be just some small project, and I get thrown into a huge Naruto Copy or something else, how can I minimize the lag using scripts?

1 Like

You will probably need to minimalize amount of infinite loops in the game that is potentionally slowing the game.

Best way to lower lag is to write efficient and non-laggy scripts. You cant make a new script to lower the lag. You will have to go over all the other scripts

Should I replace them with something else?

You can just use smaller amount of them and reduce amount of scripts overall.

They have like 10 thousand scripts…

Then that is why its lagging. That job of making things less laggy might not be worth it. You can use the analytics tools to see which scripts are running slower

Typically you also want to reduce how many remote events you are firing too.