Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is this not destroying any items in the player's inventory?

for i, tool in pairs(plr.Backpack:GetChildren()) do
		if tool:IsA('Tool') then
			plr.Backpack[tool.Name]:Destroy()
		end
	end
	for i, tool in pairs(plr.Character:GetChildren()) do
		if tool:IsA('Tool') then
			plr.Character[tool.Name]:Destroy()
		end
	end

I don't know why this isn't destroying anything. Please help. thanks

1 answer

I’ve never done this before, but maybe this will help:

—your script here (if it is a button or touch pad script goes here) Game.StarterPack.ToolName:Destroy End)

If it is a button here’s what it would do:

Script.parent.mousebutton1click:connect(function() Game.StarterPack.ToolName:Destroy() End)

The only problem with this is that it only destroys 1 tool in starter pack, not all of them, so you’d have to duplicate it with the different tool names

3 comments

0

It isn't in the starter pack, it's in repstorage.

0

But when they go into the player backpack, do they not go into the Starter Pack? Starter Pack is the back pack

0

no, starterpack and backpack aren't the same. starterpack is when you join the game and get items, and backpack is your regular inventory

This discussion is preserved as it was. New answers, comments, and votes are closed.