I just recently put some ads up for my game, and I have noticed that the servers are lagging.
Possible issues:
I could be parts and builds but I kinda doubt it because it only lags when there is a lot of people, 10+ after like 20 minutes.
I am guessing it has something to do with scripts.
I use a bunch of while loops
All pets use tween service
I thought I had fixed it before when I changed all my wait()s to wait(n(lowest is 0.05)) because I heard that would be an issue and it made sense, now I see it still isn’t fixed, so I am wondering what on earth is the problem?
Second of all, i think that for pets you can just use constraints instead (like AlignPosition and AlignOrientation, i believe it would be more performant!)
And last of all, can you provide some code? It is hard to diagnose a problem without information!
That is the cause of the game lagging I had this issue once before you should add lots of: wait() to your script or if you have alot of commands running at once like everyone clicking on a button or something make it so that it has different waits for each of the client