game.Players.PlayerRemoving:connect(function(player) coroutine.resume(coroutine.create(function() local plrKills = ods:GetAsync(tostring(player.userId).."Kills") local plrXp = ods:GetAsync(tostring(player.userId).."XP") if not plrKills then plrKills = 0 end if not plrXp then plrXp = 0 end for i = 1,#currentData do if currentData[i][1] == player.Name then ods:SetAsync(tostring(player.userId).."Kills",plrKills + currentData[i][3]) ods:SetAsync(tostring(player.userId).."XP",plrKills + currentData[i][2]) end end end)) end)
This isn't firing when the player leaves. Could this be due to filtering enabled? If so, how do I fix?