Bruh, once again i looking for help with my datastore bool script. After i changed the position of bool script, it dont saving the bool. But, when i joining, it dont print Player joining and success, after leaving, it prints player leaving, bind is loading and success x2, sometimes prints data queue is full.
wait(10) local ds = game:GetService("DataStoreService") local bool = ds:GetDataStore("ChristmasQuestSaving") local RS = game:GetService("ReplicatedStorage") --local changRemote = RS.ChanRem game.Players.PlayerAdded:Connect(function(plr) print("Player Joining...") local boolValue = plr.Other.CQuestCompleted boolValue.Value = bool:GetAsync(plr.UserId) or false print("Successful!") end) game.Players.PlayerRemoving:Connect(function(plr) print("Player Leaving...") local success, err = pcall(function() bool:SetAsync(plr.UserId, {plr.Other.CQuestCompleted.Value}) print("Successful!") end) end) game:BindToClose(function() print("Bind is loading...") for i, v in pairs(game.Players:GetPlayers()) do local data = { ["QCA"] = v.Other.CQuestCompleted.Value, } bool:SetAsync(v.UserId, data) print("Successful!") end end)
The answer is in the comment. Another way of fixing this issue is putting a :WaitForChild() when a player joins. For example:
game.Players.PlayerAdded:Connect(function(plr) plr:WaitForChild("Torso") --if it is R15, change 'Torso' to 'UpperTorso' print("Player Joining...") end)