Backpack is replaced upon spawning, instead of emptied

The Backpack instance inside Player instance is recreated each time the player spawns, causing it’s connections to disconnect after player respawns

Examples:

-- This code won't function properly because the connection will be immediately disconnected when the player's character spawns
player.Backpack.ChildAdded:Connect(function()
    print("A new tool has been added.")
end)
-- This code will function properly, as it creates the connection when the character spawns
player.CharacterAdded:Connect(function()
    player.Backpack.ChildAdded:Connect(function()
        print("A new tool has been added.")
    end)
end)

Expected behavior

Backpack should be emptied when player is about to respawn. Backpack should not be destroyed and recreated.

1 Like

Thank you for the bug report.

It may be weird, but this is unfortunately just how the Backpack has always worked. Changing it is a possibility, but would have to be done very carefully, probably through a three phase rollout, in order to avoid breaking games that have relied on this since the beginning.

If you would like this behavior to change, please file a feature request.

1 Like

Will do! Thank you for the reply!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.