I have a String Value in Lighting that I need to save every time its value is changed. But I have no idea how to save anything in Roblox. So basically, how would I save a value, and then load it up again when you come back? I tried reading the Wiki article on Data Store but I had a lot of trouble understanding it.
Some stuff about DataStores: http://wiki.roblox.com/index.php?title=Data_store
Note that you have to enable the DataStore API for your game if you want to try out DataStores in Studio mode. I can't find the link for that because I don't see the check box when I try to configure my place. Maybe someone will post that in the comments.
How to use it in your situation:
dsservice = game:GetService("DataStoreService") datastore = dsservice:GetDataStore("A string that I have to save in a DataStore") --Here you're either getting a datastore that already exists, or making a new one. datastore:SetAsync("String", game.Lighting.StringValue.Value) --Saving the StringValue object's Value to the key, "String", in the DataStore that we're using a variable for.
In another script:
dsservice = game:GetService("DataStoreService") datastore = dsservice:GetDataStore("A string that I have to save in a DataStore") text = datastore:GetAsync("String") --Gets the value of the key called "String" in the datastore print(text)