of     1   

iimerkingalaxy
#140171104Sunday, July 13, 2014 5:14 AM GMT

How would i do this im trying to make a script that has a table of 5 tools names in it from backpack then below theirs a clear all the tools even if all the tools are not there it still removes which tools are there i have no clue on how to do so,
cornytime
#140171235Sunday, July 13, 2014 5:16 AM GMT

game.Players.PlayerName.Backpack:ClearAllChildren()
iimerkingalaxy
#140171538Sunday, July 13, 2014 5:21 AM GMT

i dont want to clear all children i need only the list of 5 ,
Nymint
#140171677Sunday, July 13, 2014 5:22 AM GMT

I don't understand the way you're expressing yourself. Do you want to delete there 5 certain tools only? Or the opposite?
iimerkingalaxy
#140171870Sunday, July 13, 2014 5:25 AM GMT

i only want to delete the tools out of the 5 tools not any of the rest.
Nymint
#140172448Sunday, July 13, 2014 5:31 AM GMT

Got it, here. local player=Game.Players.LocalPlayer (Obviously a localscript) local Tools={"Tool1","Tool2","Tool3","Tool4","Tool5"} for _,v in pairs(player:WaitForChild("Backpack") do for i=1,#Tools do if v.Name:lower()==Tools[i]:lower() then v:Destroy() end end end
iimerkingalaxy
#140172798Sunday, July 13, 2014 5:35 AM GMT

this is underlined red for _,v in pairs(player:WaitForChild("Backpack") do
AnonyAnonymous
#140172808Sunday, July 13, 2014 5:36 AM GMT

ToolsToBeRemoved = {1,2,3,4,5} for _,v in pairs(game.Players:GetChildren()) do for _,i in pairs(ToolsToBeRemoved) do if v.Backpack:FindFirstChild(i.Name) then v.Backpack:FindFirstChild(i.Name):Remove() end end end
iimerkingalaxy
#140172850Sunday, July 13, 2014 5:36 AM GMT

got it nvm
iimerkingalaxy
#140173066Sunday, July 13, 2014 5:39 AM GMT

this doesnt work :< local player=Game.Players.LocalPlayer local Tools={"Tool1","Tool2","Tool3","Tool4","Tool5"} while wait(.1) do for _,v in pairs(player:WaitForChild("Backpack")) do for i=1,#Tools do if v.Name:lower()==Tools[i]:lower() then v:Destroy() end end end end
iimerkingalaxy
#140173247Sunday, July 13, 2014 5:41 AM GMT

> AnonyAnonymous it wont work.
Nymint
#140173586Sunday, July 13, 2014 5:45 AM GMT

._. It's the method I use for my tools, how can't it work? it's technically like saying if tool.classname="potato" then tool:destroy() end
iimerkingalaxy
#140173770Sunday, July 13, 2014 5:48 AM GMT

try it in studio is in in starter pack mine was in starter gui
iimerkingalaxy
#140173867Sunday, July 13, 2014 5:49 AM GMT

also im not removing tool's im removing local script's key down function's.
iimerkingalaxy
#140174303Sunday, July 13, 2014 5:54 AM GMT

bump
iimerkingalaxy
#140175018Sunday, July 13, 2014 6:05 AM GMT

VV

    of     1