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

How would I make a brick that removes the players tools?

I've searched everywhere and I cannot seem to find any explanation on how to do it.

1 answer

Its fairly simple

brick.Touched:Connect(function(part)
	local p = game.Players:GetPlayerFromCharacter(part.Parent)
	if p then
		p.Backpack:ClearAllChildren()
		if p.Character:FindFirstChildOfClass("Tool") then 
			p.Character:FindFirstChildOfClass("Tool"):Destroy()
		end
	end
end)

Just define brick as the part you want it to be. P.S .Touched can have problems in some circumstances, be careful.

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