I use the roblox clone() function to copy from ServerStorage to Workspace
After map is cloned and parented I move the players to spawns.
On the players screen the map’s parts are still popping in after server clones the map to Workspace. I don’t want players still seeing map parts loading in. How can I monitor whether the parts have actually replicated to the client successfully?
I have multiple large maps so replicated storage would not viable if players need to store all of those parts.
I tried looking on the forum and google, but so I haven’t found this problem. What should I be searching for to find the solution if there is one?
You may want to look into the “RequestQueueSize” property of the “ContentProvider” service.
When the server streams a mesh, union or another asset to a client, the request queue will reflect that, therefore comparing the request queue against “0” should let you know when the client has loaded everything and has the ability to render it.
Do note that similarly upon initial load, your frames may drop for a moment when streaming large maps all at once, which can place sudden stress on the render clock, slowing things down for a moment. You can also attempt to send smaller chunks at a time to alleviate this problem, or move the camera away temporarily to limit the render stress for each frame.
I would also recommend you upload/save your maps as an asset, and use the “InsertService”’ function: “LoadAsset” to load them dynamically when needed. This will same you a TON of memory, as you’re not only not storing more than one map on the server at a time, you’re also not duplicating any. https://developer.roblox.com/en-us/api-reference/class/InsertService
I don’t think this is a problem whatsoever. InsertService does nothing to mediate the problem, its actually worse, because it takes time to load in assets.
If its stored on the server, memory won’t be a problem. @ash877, maybe divert the players camera from the map? It would stop the players from seeing the parts load in. Alternatively, you could put the maps in Replicatedstorage.
The server as far as I know doesn’t. Take games like Phantom Forces, it has a ton of maps (I think maybe 40 or 50 counting the VIP server ones?), yet doesn’t have any issues with memory.
Their maps aren’t simple either.
It’s think its a bit to difficult to speculate either-or, I’m not certain how roblox does its server instancing but It wouldn’t make sense if they did not have some sort of allocation limit, otherwise, anyone could just exploit such behavior and cost ROBLOX a fortune in cloud data storage costs.
At the end of the day there’s very little functionality one can use to determine if something is actually being rendered, but you can generally determine if something has been loaded and cached via http requests and such, and therefore I use the RequestQueueSize.
Perhaps try out the IsLoaded function that prioritizes on loading the game prior before the Client entering the server virtually.
if not game:IsLoaded() then
However, this function does not work with ScreenGuis since the process only works with the other customs of the game like parts and such. Not sure why the wiki doesn’t touch up on this. If you’re interested in wanting the UIs being loaded in for the player, I recommend this plugin made by @Crazyman32.
Aside from that, of course it would be advised that you create your own custom loading screen, but that shouldn’t be too difficult. Hopefully this solves the problem.
I do use the above method. But I’m referencing round based map loading. I have a server script that loads the map in and then teleports players. However, due to big chunks lagg spiking the clients don’t load the map locally before the teleport which means they teleport in seeing chunks missing.