Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is replicatedstorage values the same for all players?

Asked by 4 years ago
Edited 4 years ago

I am making an indiana jones adventure game and created a functioning GUI for achievements, stat and etc. I have the unique players values such as coins and experience loaded into replicatedStorage to be changed and accessed by other parts of the game and then when the player leaves I use a datastore to store the replicatedstorage values in a table and load them when they enter back. I was wondering before I go on if I change the replicatedStorage values of one player's coins value would it change all of them? I want each player to have seperate coins values and change seperately but I realized that not many people use replicatedStorage so I was wondering if replicatedStorage changes values globally.

0
yeah. from a local script you cannot change things from the replicated storage but you can from the server. the replicated storage is the same for everyone. royaltoe 5144 — 4y
0
I acess replicatedstorage stuff from my gui all the time. Are you sure your not talking about server storage? jakebball2014 84 — 4y

2 answers

Log in to vote
0
Answered by
kazeks123 195
4 years ago

Replicated storage should be used only to store objects that you will be needing later on in the game, so they are replicated to each client (player). Basically you shouldn't use replicated storage as game runtime storage (especially not for storing player stats!).

Instead, stats should be stored in game.Players.LocalPlayer directory (better in a seperate folder). It is the place where starterGui, satrterPlayer and starterPack are placed in when the game loads.

As for wether or not replicated storage is global, I would say no, since everything in it is replicated to the client (player) when the game loads in and therefore it is local (but still a bad place to store stats).

0
Replicated storage is global, i think rep storage is a great place to store stuff like: Shop values, sometimes money, and inventory data. BashGuy10 384 — 4y
0
also, because of FE, any changes of the client = not for other clients. BashGuy10 384 — 4y
0
also also, server storage is better for storing stuff for later on ingame, because more thing to be replicated to client is more lag to the client! BashGuy10 384 — 4y
Ad
Log in to vote
0
Answered by
nc2r 117
4 years ago

Yes, unless one of the players changes it from the client, in that case, the change is only displayed for that client only

Answer this question