speedy250
|
  |
| Joined: 16 May 2008 |
| Total Posts: 4783 |
|
|
| 29 Jul 2011 06:21 PM |
| A short way to just empty a persons inventory. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 06:32 PM |
Put admin in your game
Then say take/all/*NAMEHERE*
No requests |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 29 Jul 2011 06:33 PM |
Yeah, I'll include a function so I can demonstrate how.
function onTouch(hit) if hit.Parent:findFirstChild("Humanoid") ~= nil then
-- This is the necessary part. vvvv
for i,v in pairs(game.Players:GetPlayerFromCharacter(hit.Parent).Backpack:GetChildren()) do if V:IsA("Tool") or v:IsA("Hopperbin") then v:Remove()
-- This is the necessary part. ^^^
end end end end script.Parent.Touched:connect(onTouch)
This wouldn't remove any tools that were being used because they are children of the character, therefore you would have to do the same except do "for i,v in pairs(hit.Parent:GetChildren()) do" instead. |
|
|
| Report Abuse |
|
|
speedy250
|
  |
| Joined: 16 May 2008 |
| Total Posts: 4783 |
|
|
| 29 Jul 2011 06:34 PM |
@ikillnoobs
itried making one but it was too long |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 06:36 PM |
@ikillnoobs
Fail you capitalized a v. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2011 06:36 PM |
| I meant killjoy I just failed there :/ |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 29 Jul 2011 06:37 PM |
| People make mistakes, and my name is killjoy. |
|
|
| Report Abuse |
|
|
| |
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
| |
|
Cliff86
|
  |
| Joined: 01 Mar 2008 |
| Total Posts: 216 |
|
|
| 29 Jul 2011 06:40 PM |
or:
function ot(hit) if hit.Parent.Humanoid == nil then return end p = game.Players:getPlayerFromCharacter(hit.Parent) p.BackPack:remove() bp = Instance.new("BackPack",p) end
script.Parent.Touched:connect(ot) |
|
|
| Report Abuse |
|
|