Recently, I released a difficulty chart obby with basic features such as playtime gifts, shop, halos and rebirth. However, every day my players have been complaining about lag, on both computer and mobile devices. The game is not smooth and has lag spikes every so often, heavily taking a toll on our playtime as players leave by the 5th stage if there is lag.
We’ve been trying to fix the lag in our game by enabling streaming to reduce rendering distance, though this did not solve the issue as we tested, the whole game is only around 11k parts and other games we own have around 17k parts without the problem of lag. We tried removing unions or models in the game that could cause lag, to no avail.
So this brings us to potential scripts in our game that could the issue. Since we have basic scripts and systems that many games do, our team cannot seem to figure out the issue.
Any ideas or suggestions of what may be causing the problem? Feedback of common scripts/objects that may cause lag? Thank you!
Remove unnecessary things such as parts that are not used in the game, as well as empty ‘models’ and consider using unions for parts
Also, avoid adding items from the Toolbox since many of them are poorly optimized and make sure to fix scripts, as scripts can generate various errors that consume performance
Hi there! Please read my tutorial on how to do this! It may seem long, but it goes into depth about part movement and performance. Another suggestion would be to try and spawn all of those parts for the client instead of the server.
Hiya! I understand your concern regarding lag issues in your Roblox game, which can be a frustrating experience for both you and your players. Addressing this problem involves a systematic approach:
First, consider evaluating your game’s assets and scripts individually. Since you’ve already eliminated the possibility of it being due to the number of parts, it’s essential to review the specific scripts and objects that might be causing performance issues. Common culprits include overly complex or inefficient scripts, excessive use of server/client calls, or scripts that continually spawn objects without proper management.
Next, analyze any custom scripts or systems you have in place. It’s possible that some custom scripts are causing performance bottlenecks. Check for any loops or computations that might be resource-intensive, and optimize them if necessary. Make sure you’re using efficient practices for handling events, connections, and data processing within your game.
Examine the use of unions, models, and other assets in your game. While you mentioned that you tried removing unions and models, it’s crucial to verify that no resource-intensive assets are left in your game. Large or high-poly models can significantly impact performance.
Consider implementing performance monitoring tools and measuring frame rates and memory usage. Roblox Studio provides built-in tools for tracking performance, which can help identify areas of concern. This data can guide your optimization efforts by pinpointing specific issues or scripts that are causing lag.