Lag over time bug

  1. What do you want to achieve?
    No lag in my game.

  2. What is the issue?
    Over time the game lags a lot, Say like 30mins, If you spam the wasd keys you lag like crazy also just by playing the game you are just lagging a lot.

  3. What solutions have you tried so far?
    I had a day/night time script, I thought it was that so I deleted but no also I tried using this anti-lag script
    and that did not work too.

I wish to fix this bug.

You have to check for unnecessarily fired events.

By pressing keys you lag? Check the fired events. Properly debug your scripts to find which script results in lag. If it’s intentional behavior, then you should find ways to optimize your game, however it depends on the game itself.



So there are a few things wrong here.

First off the script does absolutely nothing. The Debris service does not control how many parts are in the game. For an explanation of what it does look at the api here.

Second, there is not enough information for anyone to reasonably understand what is causing lag in the game. If you want more step-by-step and detailed help to solving your problem you will have to give more information.

If you don’t wish to give more details about what is happening (which is understandable) then the best I can say is just reiterating what @PashaSuper2409 said about checking for unnecessarily fired events.

1 Like

Usually the biggest causes for lag for me are too many remote events firing or too many moving parts in the server, but like @scotch101tape said there is really no way for us to help because you haven’t told us much about the game.