Answer the question for sanity’s sake please. How or where did you first notice this issue? Surely you didn’t magically start with this repro case. It will help determine if the repro case is faulty or if there is actually an issue impacting a project you’re working on.
I don’t know how that’s relevant, you’ll get the same results with an empty baseplate. Sure it doesn’t really have much of an impact but I posted here with the intention of it getting pushed up to bug reports.
If you’re going to reject any troubleshooting or investigation efforts to ensure that this is actually an issue, then I don’t see why I should waste my time here. I will investigate this myself later if I have time.
Refrain from posting vague bug reports in the future if you’re just going to do this again.
local players = {}
setmetatable(players, {__mode = "kv"})
game.Players.PlayerAdded:Connect(function(p)
players[Instance.new"Part"] = true
players[p] = true
end)
while true do
for k, v in pairs(players) do print(k, v) end
wait(5)
end
After joining the game the output shows “Player1 true”, which implies the part I create in PlayerAdded does get GC’d. If I had to guess, after a player leaves the object is parented to nil but a reference to it still exists elsewhere, perhaps internally by the engine or somewhere in a corescript?