This is a re-upload of the original post, where I talked about my datastore not saving/bringing the save files. I have enabled studio service to API and HTTP service.
Here is my ServerScript, located within ServerScriptService.
local dsService = game:GetService("DataStoreService")
local ds = dsService:GetDataStore("MoneyStats")
game.Players.PlayerAdded:Connect(function(plr)
local folder = Instance.new("Folder", plr)
folder.Name = "leaderstats"
local currency = Instance.new("IntValue", folder)
currency.Name = "Vertigo" -- Currency name.
currency.Value = ds:GetAsync(plr.UserId) or 100
currency.Changed:Connect(function()
wait()
print("Saving new stats")
ds:SetAsync(plr.UserId, currency.Value)
end)
end)
game.Players.PlayerRemoving:Connect(function(plr)
wait()
print("Getting stats")
ds:SetAsync(plr.UserId, plr.leaderstats.Vertigo.Value)
end)
Yet, this doesn't work. I'm still confused on why everyone else's DataStores work while mine never do.
Help please!
