Should I practice doing this?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Should I put values in ReplicatedStorage?

  2. What is the issue? Include screenshots / videos if possible!
    So I’m making a Sonic The Hedgehog-inspired game and there are rings for the player to collect. Is storing this value in ReplicatedStorage the best option?

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Originally, I put the IntValues inside the client’s local script, but then put it in a folder located in ReplicatedStorage because it may just keep the Value of the Int stuck to 0. And also because it may be easier for the client and server scripts to access the value if its placed in ReplicatedStorage.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Values = ReplicatedStorage:FindFirstChild("Values")
local IntObject = Values:WaitForChild("Rings")
2 Likes

I usually do this because keeping values inside Replicated Storage means that its more accessible by the Server and Client. Another advantage of this is better performance because keeping the workspace only for models and parts is more better than flooding it with values, scripts and more in my opinion. (If I am wrong, may someone please correct me)

Hope this helps! :slight_smile:

2 Likes

if you need the server to access the objects/values and the client then add it in replicated storage and if you want the server only to access it then add it server storage

2 Likes

yes your correct because objects in rs doesnot render so its better for performance

1 Like

Putting value in replicated storage is not the best idea, because it will help hackers to change the total value of the received rings.

The best solution is to use a Server Script to get the rings and put the value in the table. If you want the value of the rings to remain even after you exit the game, then use the data store.

To get the value of the rings in the local script, you can use the remote function. But still, I do not advise you to do any currency manipulation in local scripts

1 Like

The rings do not save when players leave the game. And yes, I am aware of exploiters.

Thank you all for your suggestions.

Is a simple solution just putting values inside the script your referencing it inside and then just:

local Integer = script.Parent:WaitForChild("Integer")
Integer.Value = {Value here}

instead of 

local IntegerValue = script.Parent:WaitForChild("Integer").Value
IntegerValue = {Value here}

Yes.

Store them all in ReplicatedStorage, even if you’re accessing them by either the client or the server, because who knows … You may need to access them by both.

Make sure to create a separate Folder for them.

1 Like

Oh, okay. Thank you :sweat_smile:

I was really over calculating where I should put values.

It’s also not a PVP or currency-based game so in a way putting them in ReplicatedStorage is useful, because both server and client can access it, but also the Rings value is vulnerable to exploiters.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.