generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to destroy the player's backpack tools

Previous Thread :: Next Thread 
Lerorno is not online. Lerorno
Joined: 16 Jul 2014
Total Posts: 278
31 Jan 2015 11:24 AM
I am trying to destroy the players backpack tools after one second of death. This is what i have:

Humanoid = script.Parent.Parent.Character.Humanoid
g = script.Parent:GetChildren()

if Humanoid.Health == 0 then
wait(1)
script.Parent.g:Destroy()
end



Report Abuse
Lerorno is not online. Lerorno
Joined: 16 Jul 2014
Total Posts: 278
31 Jan 2015 11:27 AM
This is a StarterPack script btw.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
31 Jan 2015 11:31 AM
Why?
Tools in the Backpack reset when a new character is created anyway.
Report Abuse
JOJObuddy011 is not online. JOJObuddy011
Joined: 27 Sep 2012
Total Posts: 840
31 Jan 2015 11:38 AM
-- Put this into Workspace or ServerScriptService.

game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
wait(1)
for i,v in pairs(player.Backpack) do
if v:IsA('Tool') or v:IsA('HopperBin') then v:destroy()
end
end)
end)
end)
Report Abuse
Lerorno is not online. Lerorno
Joined: 16 Jul 2014
Total Posts: 278
31 Jan 2015 11:43 AM
Reason being s that when the player dies, some tools used in the game flood into their backpack.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image