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

Where should I put intvalue and stringvalue of the server?

Asked by
ksony 54
5 years ago
Edited 5 years ago

Where should intvalue, stringvalue be placed to be part of the server? I need to change its values constantly and return the values to put it in intvalue and local stringvalue

0
replicated storage tonyv537 95 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

If your sharing the values with the Server & Client then place then in Replicated Storage. The only downside to this is that the client can change the values. On the other hand, if you only want the server to see the variables then place them in Server Storage.

I hope this helps. If it did consider marking this question as accepted.

0
A LocalScript Can access the replicated storage? It would help me a lot, but the most important thing is that the values are not from the client, but from the server. ksony 54 — 5y
Ad
Log in to vote
0
Answered by
SteamG00B 1633 Moderation Voter
5 years ago

I know this is used in other languages, but you could make getter/setter functions, and only allow the server to access both getter and setter functions while having the client only have access to getter functions.

Sorry if I am calling this the wrong thing in the context of lua, but I have not come across anyone using this method on roblox before.

Answer this question