Hi, so i got this error and idk what the hell is going on since i never had this error
error: ServerScriptService.leaderstats:84: attempt to index nil with 'UserId'
game:BindToClose(function(player) for _, Player in pairs(game.Players:GetPlayers()) do local playerUserId = "player_"..player.UserId
Instead of
local playerUserId = "player_"..player.UserId
do
local playerUserId = "player_"..Player.UserId