Lag Optimization Tips Needed!

Hi. I’m very very frustrated. My game development has come to a drastic pause. Why? Lag.

  1. What do you want to achieve? Very little, or no lag visible to players.

  2. What is the issue? Parts/meshes are causing too much lag.

  3. What solutions have you thought of so far? Everything. From placing the objects in files to making low poly meshes…

I seriously need help optimizing my game of lag. Lag is my nemesis when it comes to games I make. The game can be running smoothly for the first few days. But as soon as I make something that requires spawning parts… the lag goes berserk. Example: (Parts are in server storage, and they are cloned once. That clone is put into the workspace, which makes a lot of lag for some reason.) I was recommended to make low poly balls and cylinders… (Which is what my mesh contains.) and I followed their advice. However, lag still exists. I’m not sure what to do anymore. Please… whatever lag optimization tips you have for me… PLEASE SHARE THEM! :sob:

5 Likes

Do you have sure the game doesn’t have any type of virus?

I’ve checked. There are no game viruses. :confused:

2 Likes

make sure you have checked throughout in scripts. some virus can be very well hidden. A lot of free assets contain viruses, even though they might have a high like to dislike ratio percentage

1 Like

Okay, I’ll double check. However, if there are any optimization tips, please tell me them.

2 Likes

Here is a tip. If it is not necessary for a part to have canCollide/CastShadow, disable it, turn off canCollide and castShadow. I think it might help a little.

1 Like

Okay. I have a lot of parts with CastShadow, so I’ll try that.

1 Like

may i ask how many parts/meshes your game has

1 Like

Make sure Parts aren’t doubled on your workspace, and if your game uses light try to union part that uses light service.

For example: Part x and Part y which contains light service are laggier than a Union with light service, it happens because the game doesn’t need to render two light instead of just one union that contains one light.

1 Like

Srry for late response. My bad.

1 Like

My game has like, 10-20 meshes.

1 Like

Meshes depending of what they are, they may cause lots of lag. Can you send a screenshot of your game?

Okay. I already have a screenshot from previous posts. So I’ll just send it.

oops… wrong button. ;-;
PartsScreenShot

@Omnipotent_Corrupted These are the parts. They’re like walls. They move too if that helps.

They spawn after a certain amount of time.

Okay Okay, but how do you did they able to move?

…Okay so… at first… they just moved seperately, and they were anchored. THEN I changed it to welding the walls to one part that moved. At this point they are unanchored.

Yes that makes sense, but how they are moved, script, animation, tween service…

They are moved using CFrame.
EX: script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 3, 0)