i do not get any errors but "red" does not get created, unless i move it above "WhichSelected" but then "WhichSelected" does not get created
local players = game:GetService("Players") local datastore = game:GetService("DataStoreService") local ds1 = datastore:GetDataStore("Gs165g61g6sg16G6") local ds2 = datastore:GetDataStore("Gsga1hs61sd5j1sj6s1") players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder") folder.Name = "Colors" folder.Parent = player local WhichEquipped = Instance.new("StringValue") WhichEquipped.Name = "WhichIsEquipped" WhichEquipped.Parent = player WhichEquipped.Value = ds1:GetAsync(player.UserId) or "Red" ds1:SetAsync(player.UserId, WhichEquipped.Value) local red = Instance.new("BoolValue") red.Name = "RedUnlocked" red.Parent = player.Colors red.Value = ds2:GetAsync(player.UserId) or false ds2:SetAsync(player.UserId, red.Value) WhichEquipped.Changed:connect(function() ds1:SetAsync(player.UserId, WhichEquipped.Value) end) red.Changed:connect(function() ds2:SetAsync(player.UserId, red.Value) end) end)
i think something is wrong with these lines
red.Value = ds2:GetAsync(player.UserId) or false ds2:SetAsync(player.UserId, red.Value)
If you want to make 2 int values then you have to make 2 int values like try making 2 int values but set their parent to the leaderstats folder that you created.