What Happens to Tools in the Backpack During a Character Reset?

Hi everyone,

I have a question about the behavior of tools in the Backpack when a character reset happens.

When the character is reset, I notice that the tools in the Backpack are briefly updated (they disappear and then reappear), but I’m not sure exactly what happens behind the scenes. It seems like the parent of the tool might be changed temporarily.

What does happen?

  1. Are the tools in the Backpack deleted with :Destroy() and then added back after the character reset?

  2. Is the parent of the tool briefly set to nil and then changed back to the Backpack?

  3. Does the tool simply stay in the Backpack with no changes happening?

  4. Or does happen something else?

Also, I’ve observed that if I put a LocalScript inside the tool and then perform a character reset, the script always runs again when the character respawns.

I’m hoping someone can explain what exactly happens internally when the character is reset and how the tools in the Backpack are affected.

Thanks in advance!

2 Likes

The backpack and all tools are destroyed, a new backpack is created, and everything in player.StarterGear and the StarterPack service is cloned into the new backpack.

1 Like

Thanks a lot, I understand it much better now!

I just have one more question:

When exactly does the backpack get destroyed and a new one gets added?

Does this happen when CharacterAdded is fired,
or does it occur with CharacterRemoving?
or neither?

I’m trying to understand the exact moment when the backpack is removed and a new one is created when the player respawns.

The docs says that the backpack instance will be destroyed when the player dies and the tools will be copied over when the character spawns.

But when you go to studio, play the game, and reset character.
The Backpack is still there,

the backpack is then deleted, when the character respawns?

So it will delete and add backpack, when characcter respawns?

idk

yes just like the docs says and the highlighted part in the image the Backpack is removed and a new one will be created
It’s destroyed and a new one is made immediately.
this simple script demonstrates it.

local Players = game:GetService("Players")
local player = Players.LocalPlayer

player.CharacterAdded:Connect(function()

	local backpack = player.Backpack

	backpack.Destroying:Connect(function()
		print("the backpack was destroyed.")
	end)
end)

you will notice that every time you reset it will print.

Looks like just before CharacterRemoving is fired.

image

It’s just like when you started as you are actually restarting. StarterPack Tools will be set back in place but everything else is gone … Or the game has a custom inventory system, tools may be stored and restored after reset. Just need to know the names and to add them back when they respawn basically.