Will a dead players tool get destroyed or just cause memory leaks

This question is simple, will a tool be destroyed when a player dies or it will just eat memory?

Nothing gets destroyed or added. The backpack is inside of the player object.

If a player has an object in their backpack when they die, it will be deleted. If they are holding it then two things can happen, A: they drop it for another player, if you have the setting enabled, or B: It is destroyed. You don’t need to worry about memory leaks in this instance.

Backpacks are destroyed when CharacterRemoving is fired, you can verify this by printing a destroyed character’s backpack’s parent.

local Game = game
local Players = Game:GetService("Players")
local Player = Players.LocalPlayer
local Backpack = Player:FindFirstChildOfClass("Backpack") or Player:WaitForChild("Backpack")

local function OnCharacterRemoving(Character)
	print(Backpack.Parent) --nil
end

Player.CharacterRemoving:Connect(OnCharacterRemoving)
1 Like