Hello guys! I still can't figure out why won't the second datastore would load the BoolValue. It sends no errors back it just won't load up.
first datastore script (works):
local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("CompleteSaveSystem")
local ds2 = datastore:GetDataStore("TTSaveSystem")
game.Players.PlayerAdded:connect(function(plr)
local folder = Instance.new("Folder", plr)
folder.Name = "leaderstats"
local Complete = Instance.new("IntValue", folder)
Complete.Name = "Completes"
local TT = Instance.new("IntValue", folder)
TT.Name = "Tree Tokens"
Complete.Value = ds1:GetAsync(plr.UserId) or 0
ds1:SetAsync(plr.UserId, Complete.Value)
TT.Value = ds2:GetAsync(plr.UserId) or 0
ds2:SetAsync(plr.UserId, TT.Value)
Complete.Changed:connect(function()
ds1:SetAsync(plr.UserId, Complete.Value)
end)
TT.Changed:connect(function()
ds2:SetAsync(plr.UserId, TT.Value)
end)
end)
second script (won't work):
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService") -- Getting data store service
Players.PlayerAdded:connect(function(player)
local TrackersData = DataStoreService:GetDataStore(player.UserId.."Trackers") -- Getting data store
local LevelTracker = Instance.new("Folder")
LevelTracker.Parent = player
LevelTracker.Name = "LevelTracker"
local Level1 = Instance.new("BoolValue")
Level1.Parent = LevelTracker
Level1.Name = "Level1"
Level1.Value = false
local Value = TrackersData:GetAsync("Level1") -- Getting value from data store "TrackersData"
if Value == nil then
TrackersData:SetAsync("Level1",false) -- if value equals nothing then it'll creates it.
else
Level1.Value = Value
end
end)

4 comments
I would take a look at this. https://developer.roblox.com/en-us/articles/Data-store
When i mean I still can't figure I mean I did it some times
A good thing is to do some printing. Print what stuff the TrackersData gets from the datastore f.ex. Not checking thru the script yet because this is something you could check yourself. (:
how do I do that?