Greetings, I humbly ask, how can i update the client let’s say if a coins value has changed? If i have player’s stats stored in serverstorage and since client can’t access serverstorage, how do i inform them with data or if a currency has been updated?
Number and IntValues have a .Changed Event. This event fires when the objects value changed. Connect a function to this event and fire the client using a remote event each time it updates to tell them their new currency value.
If you really want to store it inside ServerStorage then you have to use something like RemoteEvents. But you can store your values in a more accessible place like ReplicatedStorage too. This is not more vulnerable for exploiters if that’s where you are scared of.
i dont think exploiters can change values in replicated storage,yes they can but it wont replicate to server so if your shop system is server sided players wont be able to get infinite money
You need to update the values serverside. Then it actually does update the values, and if you script it as secure as possible it would not be possible to exploit it and get infinite money.
thats exactly what i said but my english wasnt good
I find that storing player stats in ReplicatedStorage or Players in a much better approach than putting it in ServerStorage.
If so then it would make your case easier since you do not need to send RE.
thank you, what about for like the size of a folder like e.g. #folder , because usually on client i maybe check like ChildAdded to see what gets added in folder, how would i do this now?
The method is similar. If you add a child in a replicated service (Including Players, Workspace, ReplicatedStorage), you can connect .Changed on the client too. However, if you do it in a non replicated service (ServerStorage, ServerScriptService), you can connect a .Changed event in the server, which fires a RemoteEvent to the client.