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

how can client access .Changed event of instances in ServerStorage?

Asked by
kyoceri 19
6 years ago
Edited 6 years ago

hi all, i have a datastore script which generates a ton of IntValues, StringValues etc to be used as stats (which are saved by the game) my only problem is, the client can't access these stats, as they are in serverstorage. they are stored like this: game.ServerStorage[player.Name]

the only solution i have thought of so far is a while wait(1) do loop, which is very inefficient as well as slow to update on the player's GUI for example.

i was possibly thinking of an event which checks serverside and fires the client telling which stat has changed and the new value of it, but i dont know how to do that, other than looping through all the players in the game at the time, which might be inefficient.

0
The player cannot access Server Storage even if FE is off. Why are you telling us that it is FE? hiimgoodpack 2009 — 6y
0
oh didn't realise sorry kyoceri 19 — 6y
3
The whole point of ServerStorage is to hide stuff from the client lukeb50 631 — 6y
0
Yeah. ServerStorage's contents do not get replicated to the client, however, replicated storage contents get replicated to the client. hiimgoodpack 2009 — 6y
View all comments (3 more)
0
yeah i realise, but this doesn't solve my problem D: kyoceri 19 — 6y
0
Change how you do it. There is no solution to your problem as it is lukeb50 631 — 6y
0
seriously? :p kyoceri 19 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

The client cannot access the services ServerStorage and ServerScriptService, since they are used to basically "hide stuff from the client" as lukeb50 said. An easy way would be to use RemoteEvents. Please accept my answer if this helped!

Ad

Answer this question