local ds = game:GetService("DataStoreService")
local bool = ds:GetDataStore("BoolSaving?")
game.Players.PlayerAdded:Connect(function(plr)
local boolValue = Instance.new("BoolValue")
boolValue.Parent = plr
boolValue.Name = "BoolValue"
local boolValue1 = Instance.new("BoolValue")
boolValue1.Parent = plr
boolValue1.Name = "BoolValue1"
boolValue.Value = bool:GetAsync(plr.UserId) or false
boolValue1.Value = bool:GetAsync(plr.UserId) or false
end)
game.Players.PlayerRemoving:Connect(function(plr)
bool:SetAsync(plr.UserId, plr.BoolValue.Value)
bool:SetAsync(plr.UserId, plr.BoolValue1.Value)
end)
For some reasons, this script doesnt work, idk why. Also im not really good at datastore so please show me the fixed script if you know.
