Do removing comments in the script help with reducing lag? because i have a lot of them and I’m wondering if it actually does decrease the lags
No, it will not reduce lag exept if you have a million of them.
I have like alot of them but should i remove it for a fps boost?
No its probably just your scripts maybe you can change them up a little and check what other developers would do and in studio its always laggy cause it run on your pc not roblox servers so in the game it will be less laggy.
Comments don’t do anything for performance. It’d be best to leave them in so that you understand what the script is doing later on.
You could have a script full of comments, and I mean quite literally full. It could have several billion comments, and they will not impact the performance of the script at all. They’re ignored entirely by the LuaU compiler.
The only issue you may encounter is being unable to open the script (especially in Studio) due to the massive size of the script’s contents.
It won’t affect script performance at all. Roblox automatically trims comments, whitespaces, etc. before sending files over the network to the client. Even if they did make it over, they would be ignored before being compiled or run. Comments could, however, affect in-studio performance depending on the length of your script.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.