How i can reduce lags?

Hello! I’m currently making a French army and that pretty done but did a poll to know the % of people have a bad PC(like 40FPS on Arsenal or global) and 73% of them have bad pc but my game is pretty big/fat how do i reduce lags on it(its a realistic game dont want to reduce it :D) ?

Here the link of the game : A.F | Armée Française - Roblox

I already :
-Reduced script bugs of the console of F9
-Seen about viruses seems to be ok
-Check about duplicated things or things that can cause lags

Thanks ! :grinning:

2 Likes
1 Like

Hello Sarah, You could reduce lag in your experience by having a loading system for when the player joins. This could easily be done by waiting for the player to join >

game.Players.PlayerAdded:Connect(function()

Next you would make each Descendant of Workspace Load separately!

game.Players.PlayerAdded:Connect(function()
for _, Object in pairs(game.Workspace:GetDescendants()) do
Object.Parent = game.ReplicatedStorage.LoadingFolder
for _, Object2 in pairs(game.ReplicatedStorage:GetDescendants()) do
Object2.Parent = workspace
wait(0.05)

This is just some quick code I wrote on a rush it might not function very well but I hope you get the concept!

i don’t really understand what you mean :sweat_smile:

How would this solve problems with the bad PCs? They most likely don’t have the RAM for this.

what is the goal of this code?!
why reparenting all game objects?

Here are a few things you can take a look into to improve performance on lower-specification computers:

  • Look at implementing a Level-of-Detail system for meshes and some parts.

    • This will reduce the quality of textures and other assets when the player isn’t near.
    • See this thread for some information on custom Level-of-Detail implementations, or this thread from a ROBLOX Staff member introducing the mesh-based Level of Detail system implemented into ROBLOX already.
  • Take a look at enabling StreamingEnabled.

    • The player’s client will only load in what is around it, reducing the number of parts, meshes and textures loaded.
    • See this page from the ROBLOX Creator Guides to see how to enable streaming enabled and changes you may have to make to your code to ensure certain things work.
  • Use UserSettings().GameSettings to get the saved graphics quality of the player, and adjust the experience on the client side to improve performance dependent on how low their graphics setting is.

    • This will allow tailoring of the game quality to the player’s client, instead of hampering the experience for others by reducing the quality of the game globally.
    • Please note that the quality check must be performed in a LocalScript, and the changes to textures, mesh quality, lighting quality, etc. must be performed on the client - If these checks are delegated to the server, the lower quality settings will replicate to all clients.
    • For more information on this subject, see this thread.

Hope this helps!

4 Likes

@vipkute0057 's answer & @itzfuneyy 's answer and also:

  • You may check every large script in your game and see if it consumes a lot of device ram. Use the dev console to check the ram consumption by the scripts. If you want to check specific script ram usage you can set its memory category by putting this line inside it: “debug.setmemorycategory(“a script tag/name here as you want”)” and this script’s memory consumption will appear with that name in the console. More debug functions.
  • You may use the Micro Profiler to check anything that is taking too much time to execute/render. Micro Profiler Documentation, Youtube Tutorial.
1 Like

Hi, for the level of details there is any public to get all mesh of the game and change it ? Because i have too many meshparts in my game and cant change manually

I’m not sure, however, all meshes (even old ones - they are converted and assigned a new ID) should be able to have their level of detail set using the LevelOfDetail property.