I have put in a teleportation script in my game where you click the GUI and you teleport to a part. But the thing is, I also want the GUI (or Script) to take away the gear that the player has so they can't harm players (It is an AFK Lobby in a murder game. You teleport to the Lobby so that you can't get killed if your AFK, but I don't know how to make it so it takes gear away).
To do this you'd have to iterate through all the children of your player's backpack, if any children are tools or hopperbins then destroy them. Same thing with the player's character because the could be equipping something.
plr = --define plr function noTools(plr) for i,v in pairs(plr.Backpack:GetChildren()) do if v:IsA('Tool') or v:IsA('HopperBin') then v:Destroy() end end for i,v in pairs(plr.Character:GetChildren()) do if v:IsA('Tool') or v:IsA('HopperBin') then v:Destroy() end end end noTools(plr);
Closed as Not Constructive by Goulstem, Redbullusa, and BlueTaslem
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?