Reproduction Steps
Every time I press Stop while testing my game in Studio, I get an error from the PlayerList core scripts. It has something to do with leaderstats, as the only leaderstat I have, “Wins”, is mentioned in the errors.
Reproduction files:
Make a new place, add a script to ServerScriptService, and paste this in:
local players = game:GetService("Players")
local function onPlayerAdded(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local winsValue = Instance.new("IntValue")
winsValue.Name = "Wins"
winsValue.Parent = leaderstats
end
players.PlayerAdded:Connect(onPlayerAdded)
for _, player in pairs(players:GetPlayers()) do
onPlayerAdded(player)
end
Expected Behavior
The PlayerList Core scripts should not show any errors.
Actual Behavior
Every time I hit stop in Studio, this error appears.
Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Constantly
Date First Experienced: 2021-06-14 00:06:00 (-05:00)
Date Last Experienced: 2021-06-15 00:06:00 (-05:00)