Hello there. in short, can I put all my client game code inside replicated first?
As it’s the only place that my framework is guaranteed to load everything without using wait for child tons of times and possibly for gui too!
And I wonder what side effects can arise if I have all my client code inside ReplicatedFirst
I barely use ReplicatedFirst but replicated storage is a way to store modules, remote events and ect. You can put parts models and ect into the storage as it will hide from the server and client, so yes you could use the replicatedstorage for storing props and ect. Hope that makes sense!
Am avoiding ReplicatedStorage altogether as it’s content exist in the server and keeps replicating to all the clients. without mentioning that I should use WaitForChild for every single child which is far from what you would like to deal with.
Also ReplicatedStorage is bad for CPU, RAM, Bandwidth of all the clients for unshared assets. That’s why am avoiding it for unshared client code.
What do you mean by client code? Is this code in LocalScripts, ModuleScripts, or Scripts? If it interacts with client-only stuff like GUIs, then it should probably be in a LocalScript within StarterPlayerScripts.
Edit:
As aforementioned, you should put LocalScripts in ReplicatedFirst if they’re being used to override the default loading screen or make GUIs/tutorials. (source)
Well for remote events. I’ll just put them in replicated storage. I don’t mind. I just want my framework to start early as to earn time and have more control.
I know what replicated first is used for. But my question is simple. Does using replicated for all of my client only modules can affect my game negatively somehow?
I know but that doesn’t stop me from using it for everything and am aware that waiting for instances out of replicated first to replicate will cancel the purpose of it. But other than that it’s a good I think.
But i still wonder if there is anything potentially wrong with putting all my code there
As long as my research goes. I think replicated first is pretty good.
I’m not so sure how hard I would endorse this. All your content in ReplicatedFirst does mean it would be the first instances replicated to the client but I’m not particularly sure how that weighs on load time so it’d be worth a test or an answer from someone who’s more knowledgeable on that topic.
Besides the concern of load times, there shouldn’t be any real side effects. You’d just be taking the majority of your client-side framework out of general replication so instead of instances being ready as they’re replicated they would be immediately available. LocalScripts in ReplicatedFirst only start running after all instances are replicated so you should reasonably be able to avoid WaitForChild.
Client-side replication does have official documentation and there’s a chart outlining Roblox’s replication process from a speculation view, if you’re interested in either.
Oh yess that’s my only concern. But even if that’s a problem.
I might be able to just put in core game stuff like the framework code and wait for the other game code that is inside StarterPlayer to replicate
Otherwise can you share with me the replication chart because roblox is so confusing when it comes to replication.