Hi there! My datastore save script won't work. But, when I execute it using the command line, it does. Any help is welcome.
local DataStoreService = game:GetService("DataStoreService")
local Wins = DataStoreService:GetDataStore("Wins")
game.Players.PlayerRemoving:connect(function(player)
print('player left')
local success, newName = pcall(function()
return game:GetService("DataStoreService"):GetDataStore("Wins"):SetAsync(114962047, 55)
end)
if success then
print("success")
end
end)
Thanks in advance, Jonas

1 comment
What is the point of only saving a value if you are not loading it?