I currently own a game, however lots of users are complaining about lag. The game is in future lighting. The game itself doesnt contain anything I would consider to be “Laggy”. There are a few .touched parts, and a few while loops within scripts. I have tried things such as optimization scripts, and changing lighting mode (to voxel), this helped massively. However, voxel just looked awful for the effect I was trying to make.
Is there any way I can reduce lag, without impacting the quality of the game? For example: Lighting optimization scripts, better ways of doing loops and .touched events?
Any help would be greatly appriciated!
Thanks in advance,
1 Like
In Roblox Studio you can go to “View” > “Script Performance” and it’ll show you every script and how much they perform. This could help you narrow down the problem and find if it’s any script in particular that’s making the game lag.
If you’re looking to optimize your game, .Touched might be too unreliable. I’d recommend looking into Workspace:GetPartBoundsInBox() or Workspace:GetPartBoundsInRadius().
If you have any more questions, please don’t hesitate to let me know!
2 Likes
Just load into the game in studio and type “/console” in the chat
For script performace, what values would be bad? Currently values are peaking at 3-5%
Your percentages should stay at <3%.