Here's my script: Script in ServerScriptService
local datastore = game:GetService("DataStoreService") local MyMoney = datastore:GetDataStore("MoneyData") local MyRuby = datastore:GetDataStore("RubyData") local bsnss = datastore:GetDataStore("BusinessOwned") game.Players.playerAdded:connect(function(player) local Money = Instance.new("IntValue", player) Money.Name = "Money" local Ruby = Instance.new("IntValue", player) Ruby.Name = "Rubys" local bsnes = Instance.new("Folder", player) bsnes.Name = "Businesses" local ps = Instance.new("BoolValue", bsnes) ps.Name = "Storage" ps.Value = false local aprt = Instance.new("BoolValue", bsnes) aprt.Name = "Apartment" aprt.Value = false Money.Value = MyMoney:GetAsync(player.UserId) or 1000 MyMoney:SetAsync(player.UserId, Money.Value) Ruby.Value = MyRuby:GetAsync(player.UserId) or 10 MyRuby:SetAsync(player.UserId, Ruby.Value) ps.Value = bsnes:GetAsync(player.UserId) or false bsnes:SetAsync(player.UserId, ps.Value) game.Players.PlayerRemoving:connect(function() MyMoney:SetAsync(player.UserId, Money.Value) MyRuby:SetAsync(player.UserId, Ruby.Value) end) end)
If a string value, bool value or any kind of value refuses to be saved inside of a store, then you can simply save them as an int value instead and call upon them via a table.
boolStates = {true, false} print(boolStates[1]) -- prints true print(boolStates[2]) -- prints false --(Save 1 and 2 depending on true or false)