Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

7 comments

0

The player cannot access Server Storage even if FE is off. Why are you telling us that it is FE?

0

oh didn't realise sorry

3

The whole point of ServerStorage is to hide stuff from the client

0

Yeah. ServerStorage's contents do not get replicated to the client, however, replicated storage contents get replicated to the client.

0

yeah i realise, but this doesn't solve my problem D:

0

Change how you do it. There is no solution to your problem as it is

0

seriously? :p

1 answer

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.