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

How do I make tools in starter pack dissapear from your inventory when you touch a part?

I was making a teleporter to a pvp arena but I don't want all the tools in the starter pack. I only want a few items. Please help

2 comments

0

Why not try and make it yourself before asking the internet?

0

I am asking the internet for help that is the point of this website

1 answer

To do this, You can use :GetChildren to get player Backpack.

Script:

script.Parent.Touched:Connect(function(hit) --Detect If Something Hit It
	if hit.Parent:FindFirstChild("Humanoid") then --Check If It A Player
		
		local player = game.Players:GetPlayerFromCharacter(hit.Parent) --Get Player

		local Children = player.Backpack:GetChildren() --Get Player Backpack

		for i = 1, #Children do
			Children[i]:Destroy() --Destroy The Item
			
		end		
	end
end)

Note:

-If you equip the item, the item will not get deleted.

-If you use starter pack, the player will get the item again when died.

Hope It Helps!

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