Hints to Better Memory Usage (800+ Memory Usage in game)

count = 0
for _, part in pairs(workspace:GetDescendants()) do
         if part:IsA("BasePart") then
                count = count + 1  

Run that on the command line and check output.

Also, you don’t need to have crazy high part counts to have a high detail game. You just need to know how to optimize on part/union/mesh count effectively


Oh its only 35K, which not bad…I would think

1 Like

See if you can remove or change anything to make them less objects.

1 Like

It depends. Considering you have unions and meshes included, you should consider the tris count of the meshes and number of negations you use.

35k is not a low part count by any means, to be honest. It’s definitely optimizable, but you’re going to have high memory usage regardless.


I took my game into studio and deleted every part outside of spawn, all meshes etc, it dropped from 3.5K memory to around 2.9K Memory… could not bad that.

Not a bad start. Could you send some sample images of the meshes in your map? I can tell how complex they are and recommend some further actions you can take to optimize.

I have way to many to sample… trees, etc but even when deleted the memory doesn’t drop dramastic.

but I also deleted my scripts as well so I can’t find the exact issue…

take a look into your scripts

for example if you have a ton of while wait() do to change your cash try using .Changed function if it dodesnt need to be constantly refreshing, this csn help with game lag drastically if there is alot of them

1 Like

only around like 10 in each teleport, but nvm I should be okay… I just need to adjust CPU… was testing big games and most have 700+ memory

1 Like

idk how good you are at scripting but you could create your own rendering system that deletes parts that are too far away and replicates them back when you are close

1 Like

would this really be less laggy?? if I send players to different levels and they have to wait for parts… I wanted the full version of my game to be speed runnable and if they have to wait would kill the fast aspect of it.

nono, sorry for the misunderstanding it wouldnt be a teleport

as they move it deletes and generates parts. some friends said this helped massively on previous games with high part count

would you say 35K is a high part count game?

for low end devices yes, you could look at optimising how parts are placed;

for example if you have built 1 wall with 4-5 different parts, after 35k parts this is alot of extra parts.

this can be a tedious task but may be worth looking at

don’t mind the tedious part, would it better to build a house with 1 union using negative parts or just 4 parts?

Read more about it in this thread:

800mb isn’t bad for a game, it’s pretty decent.

Briefly, the more RAM you have on your device, the more Roblox uses for better experience. Test the same game on a low RAM device, and you’ll see it uses less.


your better off using parts opposed to unions as theyre know to cause performance lag,

if your building houses that cant be entered just build it as 1 part , no union, although if theyre not exactly block shaped this would be difficult.

tldr; dont use unions use parts theyre far better

1 Like

To find the amount of Parts (anchored and moving) in any game you are playing hit Shift F4 (make sure your F Lock is on!)
And setting ALL Unions and Meshes to RenderFidelity Precise will have an effect on memory. If you can get away with Hull or Block, or better yet CanCollide off then you may see a bit of an improvement.

1 Like

excuse me but if I remove everything… complete game/scripts and its an empty game I still can’t get under 2k in studio… which means around 5-600 in game… my goal is to locate that 2K but now its fully empty

You can use Reduce Memory to clean all your computer rams: