Issue with replication to client

After reading this post about replication to the client I want to know if the content is still valid.

In the post it says:
Other localscripts - Player’s Backpack, Character Model, PlayerGui, and PlayerScripts
Therefore, if you had made a part in Studio (and had not modified/deleted this part when the player joins), you can reliability reference that part.

and I tested it out by putting a local script in starter player scripts and referencing baseplate. However, it still throws an error in the output calling the baseplate nil? I’m a bit confused…

Disable StreamingEnabled of workspace, possibly put a RunContext Client Script in workspace with your code and it should no longer throw an error.

Thats weird it works now after disabling streaming enabled. Why is that

1 Like

With Streaming Enabled non loaded parts don’t replicate to the client.

1 Like

If streaming enabled is set to true (Workspace.StreamingEnabled), then the error you described can happen. It’s because the part you are referencing on the client doesn’t exist for the player because it’s out of their render distance. There are a few ways you can solve this, here are two:

  1. Disable streaming enabled
    This is the fastest solution, but it also comes with the downside of increasing lag, as streaming enabled usually does reduce lag in big games with a lot of parts.
  1. Use MaterialStreamingMode.Persistent
    To do this, you’ll need to model the part, then in the model’s properties, change the MaterialStreamingMode to Persistent. This will always render the part, regardless of its distance to the player. The downside here is that using this too much could increase lag.

Read this roblox wiki about Streaming enabled (specifically the persistent property) if you want to learn more: Instance Streaming | Documentation - Roblox Creator Hub

1 Like

It can also work in the complete opposite way when a chunk gets loaded a lag spike can occur and it can result in the client crashing.

Yeah, you’re right, I’ve experienced that issue before, but it’s a good enough solution for reducing lag until you can create your own rendering system, which is what a lot of the big games do anyway.

True, however Roblox has plans to force StreamingEnabled for all places just like they did with FilteringEnabled a few years ago. It could end up in a complete disaster and the developers having to do major rewrites in order to keep their experience working.

Quick question, im getting 1000mb of client memory usage in my live testing and iv barely started my game. All I have is an egg hatching system I build and a small map. Is it bad to have 1000mb of client usage if so… how could I fix it

one thing I’m noticing is that in my Roblox starter place, I’m also getting 1000mb of client usage too

I am not that much into optimisation, my primary game uses 3000mb+ of the client memory. I would suggest checking your scripts for unnecessary loops in the Script Performance window.

1 Like

Okay quick update i’m getting like 600mb on my phone so my computer could just be funky or smt

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.