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

How to check if something is in the backpack, then remove something from the backpack?

How do I check if a certain tool is in the backpack, then get rid of something from the backpack? Help possibly?

2 comments

1

This isn't really a request site, if you were to make an attempt at it we could help fix it but you cannot just request a script

0

Look up for loops, FindFirstChild, and if statements on the wiki.

1 answer

Put this Script into the Starterpack

Players = game.Players:GetPlayers()
while(true) do
	wait(1)
	print("Hai")
	for i,v in pairs(Players) do
		print("Howdy")
		if v.Backpack:FindFirstChild("ToolName") then
			print("Hey")
		v.Backpack:FindFirstChild("ToolName"):Destroy()
		print("Done")
		end
	end
end

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