When joining a game in the Play mode, a backpack already exists for the Player, despite no character existing. The Backpack is almost immediately destroyed (presumably as a sequence of an internal LoadCharacter call) and replaced by a new one, before a new Character is added.
One would expect a Backpack to not be removed in the first place. If I were to do
local Backpack = game.Players.PlayerAdded:Wait():WaitForChild("Backpack")
I would get a Backpack that would be parented to nil within a few milliseconds.
This bug occurs consistently and predictably.
Example:
local Players = game:GetService("Players")
local function distributeTools(Player)
Player.CharacterAdded:Connect(function(char)
print(char)
end)
Player.ChildAdded:Connect(function(c)
print(c.Name.." added")
end)
Player.ChildRemoved:Connect(function(c)
print(c.Name.." removed")
end)
end
Players.PlayerAdded:Connect(distributeTools)
Order of output:
Backpack removed --Why on earth did this exist in the first place?
Backpack added
WoolHat
I code between large hiatuses, so unfortunately I cannot list a specific date. The Backpack is most likely destroyed, because its parent property becomes locked.
