I’ve been experiencing this issue with my Google Firebase Database. Everything work’s fine, however if your point’s change in-game, when you leave it doesn’t update on the database. I’ve been scratching my head for a couple of days now and can’t seem to find a solution. I added a catch to try and find an error but it’s not printing any errors at all.
Any help would be appreciated
game:GetService("Players").PlayerRemoving:Connect(function(p)
local success, err = pcall(function()
local sendData = {User_ID = p.UserId; Coins = p.pointsthings.Points.Value;}
database:UpdateAsync(p.Name, game.HttpService:JSONEncode(sendData))
end)
if not success then
print(err)
end
end)