Global game settings

Hi,

I am looking into creating global game setting for things like Sound Volume, Debug etc and was not certain how to do, I am thinking of creating a folder in ServerScriptService or ServerStorage called Settings and create Int or Str values to store them and access via a require.

Is this the best way of doing this or is there a better way?

Thanks

Yeah you can do it this way. I would also write a script to save / load them to a store.

Usually if you want to set things Globally, you create a Value and put it into ReplicatedStorage

Example:
I created a Value for Text to appear globally, I create a StringValue, and i have a Script detect the Change of the Value, then apply it to itself
(server btw, never on the client)

game.ReplicatedStorage.TextValue:GetPropertyChangedSignal("Value"):Connect(function()
Example_Of_A_TextLabel.Text = game.ReplicatedStorage.TextValue.Value
end)

This is usually a common way of doing it

Yes, you can, no problem at all.

Another option would be making a module script that returns these settings or values for any script that requires it.

1 Like

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