How would i make this datastore script save another BoolValue?
local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("BoolValueSaves")
game.Players.PlayerAdded:Connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "BoolValues"
local bs = Instance.new("BoolValue",leader)
bs.Name = "Gift"
bs.Value = ds:GetAsync(player.UserId) or false
ds:SetAsync(player.UserId, bs.Value)
bs.Changed:Connect(function()
ds:SetAsync(player.UserId, bs.Value)
end)
game.Players.PlayerRemoving:Connect(function(player)
ds:SetAsync(player.UserId, player.BoolValues.Gift.Value)
end)
end)

2 comments
you have the load script too? because if you only change the save script, dont will work when you load
Then how would i modify it so it works properly?