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.
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!