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

how to make a remove all tools upon touching a part script?

I wanted To Make a Trap Card Sorta Thing On My Red vs Blue Game Im Working On, I Already Got The Buying Trap And Placing It Down Working, But I Can't Figure Out How To Make The Remove All Tools From The Player's Backpack, So How Do I Do It? (also, it also needs to remove the player's hand tool)

1 comment

0

You asked this same question before and, I answered it. If you forgot here's the link! If I answered your question please accept it as the solution. https://scriptinghelpers.org/questions/124067/how-to-remove-all-tools-from-a-persons-backpack-when-they-touch-a-part#113096

1 answer

It`s simple, use a touched event. Example :

local part = game.Workspace.Part
part.Touched:connect(function(hit)
-- proceed to delete the tools that you have inside your backpack, i can`t give u a more detailed script because you didn`t provide any script of yours so i dont know what the names of the tools you have in your backpack and etc, hope it helps.
end)

Or another example :

for _,v in pairs(player.Character:GetChildren()) do
    if v:IsA("Tool") then
        v:Destroy()
    end
end

If those helped, i would appreciate an marked answer for that sweet sweet reputation :D Have a good day !

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