Ive got a issuse with my datastore, it aint datastoring even tho it… shoud!
heres the script, theres no errors but it doesnt save.
local DataStore = game:GetService("DataStoreService")
local Data = {
Campain1 = false;
Campain2 = false;
Campain3 = false;
Campain4 = false;
Campain5 = false;
Campain6 = false;
Campain7 = false;
Campain8 = false;
}
local DefaultData = {
Campain1 = true;
Campain2 = false;
Campain3 = false;
Campain4 = false;
Campain5 = false;
Campain6 = false;
Campain7 = false;
Campain8 = false;
}
local DataMainStore = DataStore:GetDataStore("PlayerDataTest2")
game.Players.PlayerAdded:Connect(function(plr)
if (DataMainStore:GetAsync(plr.UserId) == nil) then
DataMainStore:SetAsync(plr.UserId, DefaultData)
print("Default Data Loaded For Player "..plr.Name)
end
local data = DataMainStore:GetAsync(plr.UserId)
Data.Campain2 = true
end)
game.Players.PlayerRemoving:Connect(function(plr)
DataMainStore:SetAsync(plr.UserId, Data)
print(Data)
end)