Hi,
I made a custom inventory which stores the items in Server Storage. When a user clicks on a name in the player list, a gui pops up with the player's inventory. I have it set up so that when the player is requesting another player's inventory a Remote Function is fired which gets the item names and icon IDs into a table which is then returned to the player and the information is filled into the gui.
I was wondering if it would be more efficient to have any changes made in all of the player's inventories cloned to Replicated Storage and when the user is requesting an inventory is it done through the client. The issue is that I don't know much about memory management and I was worried that instead of making the process more efficient I will instead make the player lag with the constant update in replicated storage.
Thanks

27 comments
I'm no expert at this, but what if the values in ServerStorage replicated to ReplicatedStorage when they were changed, but not the other way around? Basically making the values in ReplicatedStorage client side, so even if an exploiter changed it, it wouldn't affect the actual values on the server?
You would have to validate it on the server anyways to make sure the exploiter didn't mess with the ReplicatedStorage version, so it would defeat the point of replicating it.
Yeah, I'm just copying what is in ServerStorage to ReplicatedStorage so it can be used to show things in the GUI. Even if someone did change things in ReplicatedStorage it wouldn't matter because it would update anew when something in the player's inventory has changed. But even if that didn't happen I thought it wouldn't replicate to other clients.
It won't replicate to other clients, all I'm saying is that if you are using something on the client side as a reference, it can be manipulated. And if your using something on the server side as a reference, then what is the point of replicating it to the client side?
I was just wondering whether it is a good idea, for example if I have to update 30 inventory slots for 30 players (900 slots) every 10 seconds (copied to replicated storage). Would it be better than if players are constantly requesting a player's inventory through remote functions.
I could have it update to replicated storage and players can request it from there as many times as they want without straining the server.
Here's what I think is happening: Disguised has some values in ServerStorage (the server). Now, he want to show those values in a GUI for a player who asks for this. So he has a RemoteFunction set up to get these values from the server. Alternatively, he could make a script that copies these values to ReplicatedStorage whenever they are changed, so the client doesn't have to use a RF to ask for
If you you wanted to do that, you would have to make sure to validate that the data wasn't forged or tampered with (ReplicatedStorage Version) on the Server version. If you did that, then that would probably be fine.
the values, but can just look at his RepicatedStorage. And even if the client changes something, the changes stay on the client, and even get overiden when the values are changed on the server and replicated to the clients. So Disguised is asking what is more effective.
If you're just using the values for the UI, then that's okay, if you're actually using the replicated values for functional purposes, then that's where you get vulnerabilities.
Its just as Risko said, I'm just worried that I won't be making it more efficient
@climethestair what do you mean? what would you have to validate? If the client changes anything, only that one client is changed and not the server Edit: Never mind I know now.
Also when it comes to trading materials, I always have it validate with the server to make sure that both players are seeing the same trade and that each has what they have offered. I'm just using the values for the UI
My scenario is this, lets say you have a cash value on the server. It goes from 0 - 10, it replicates. The client uses replicated version for the UI the UI has functionality to buy stuff. So I change the replicated cash from 10-1 million. Now the UI functionality sees me having 1 million.
But again, if it's just for display purposes then it wouldn't matter.
But isn't that impossible with FE? Only you will see it as 1 million, right?
Correct, but what I'm saying it just don't use the ReplicatedStorage version as a reference if for example your purchasing things in a shop. That transaction should be validated on the server.
So the conclusion is (or as I believe) that for display purposes, it is more effective to replicate to ReplicatedStorage (than to use RemoteFunctions) Also this is a LOT of comments on just one question
Yeah, its just a reference. A copy of the original. The question is which was is more efficient in obtaining the copy. 1. Give everyone a real time copy. or 2. Have players request a copy through remote functions.
So if I have 30 players request one copy through remote events that 30 times the work for the server when it comes to one client instead of 1 time from replicated storage. But replicated storage has everything and it wouldn't matter how many players request it
Yeah I think thats right
So it comes down to how many times a remote function can be fired before it starts to cause problems and how many times replicated storage can be updated before it starts to cause lag.
The ReplicatedStorage will be fine, and how many times are you requesting the Remote?
I player could be doing one from as fast as you can click to 5 seconds, and there could be 30 players doing that at one time. I have it set up with the remote way for everything (shop gui, updating personal inventory when things are added or removed)
You could either make a different Remote for each player, or have a loop that tallies the clicks every 2 seconds or so. Or both.
What do you mean by "Remote for each player", I have it so that the server find the folder in server storage with the ores and then returns a table. Also will it make that big of a difference if I switch to the replicated storage method?
Also, is the problem in the remote event itself or the action preformed by the server. I assume its both, but if a server were to perform an action without a remote function would it strain the server as much?