What I would like to do is get rid of all of the tools and add a sword and a gun for my fighting game, and that's it. How do I do that?
I am not sure if the tag is correct. :l
Player = game.Players.LocalPlayer Backpack = Player.Backpack for i, v, in pairs(Backpack:GetChildren()) do if v:IsA("Tool") then v:Destroy() wait() end end
--[[First you need to understand where tools are. Tools are in your backpack. To place a sword and gun in your inventory, you can place them directly in your backpack when testing or place the tools in the starter pack so everyone gets one when they join. To remove any other tools use a in pairs loop. Look it up on the wiki so you understand a little better. insert a LOCAL script, place this in a starter pack(or backpack to test) and paste the following code]]--
Player = game.Players.LocalPlayer Backpack = Player.Backpack
for i, v, in pairs(Backpack:GetChildren()) do if v:IsA("Tool") then v:Destroy() wait() end end
--An alternative if you know the name of the tool you want: Player = game.Players.LocalPlayer Backpack = Player.Backpack
for i, v, in pairs(Backpack:GetChildren()) do if v.Name == "whateverthetoolnameis" then v:Destroy() wait() end end
--Thumbs up would be greatly appreciated :DD
LevelKap,
I understand that this isn't an answer, but can you put it into code form? I can't run (test) the Local Script.