Hey, I am having problem with Saving Data.
This is the code that saves the data, When I press a GUI Button, the Remote Event Fires. I am trying to save the "Uses"'s Value I get the Print "Save Data Firing", but when I look the DataStore Editor, the Data hasn't been saved.
The Data Loading works fine, anyone knows what's wrong?
local DataStore = game:GetService("DataStoreService"):GetDataStore("Uses")
game.ReplicatedStorage.saveData.OnServerEvent:Connect(function(player)
print("Save Data Firing")
local theTable = {}
table.insert(theTable, player.Uses.Value)
local success, failed = pcall(function()
DataStore:SetAsync(player.UserId, theTable)
end)
if success then
print("Succesfuly Saved")
else
print("Data Couldn't Save")
end
end)

2 comments
Do you have API turned on inside studio?
Yes, the data loads fine, it just that it doesnt save