How to fix a data leak

Recently, when testing my game in Roblox Studio, I ran into some issues loading in. At first I didn’t think much of it but it became continous. After doing some research I discovered it was most likely a data leak but I still am not sure how to approach it, or fix it. The game is currently still extremely hard to load into if you can load in at all and memory usage spikes to around 3000 mb which has never occured before. What exacly can I do?

ModuleScripts, Packages & other forms of external loading is very helpful when developing in Roblox Studio.

For the Roblox Game Client, you should use StreamingEnabled alongside Actors for any static objects that can be unloaded and brought back in the future. Maybe have your parts on the map named as their respective materials and iterate the material changes on each player’s client (only useful when using MaterialVariants).

Though Luau is most likely compiled as Lua is itself, there’s nothing much you can do other than to check the LuaHeap memory usage to help your game performance.

1 Like