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: Why does this keep tools/weapons on death script not work?

Previous Thread :: Next Thread 
Zahkrisos is not online. Zahkrisos
Joined: 11 Aug 2009
Total Posts: 962
07 Feb 2015 10:46 PM
game.Players.PlayerAdded:connect(function(_)
for _,v in next,_:WaitForChild'Backpack'do
v:clone''.Parent=_.StarterGear
end
_:WaitForChild'Backpack'.ChildAdded:connect(function(obj)
if not(_.StarterGear(obj.Name))then
obj:clone''.Parent=_.StarterGear
end
end)
_:WaitForChild'Backpack'.ChildRemoved:connect(function(obj)
if(_.StarterGear(obj.Name))then
_.StarterGear(obj.Name):Destroy''
end
end)
end)
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
07 Feb 2015 10:51 PM
This is a bit overcomplicated
game.Players.PlayerAdded:connect (function (player)
player:WaitForChild ("Backpack").ChildAdded:connect (function (child)
if child:IsA ("Tool") then -- hey, some people put scripts in here for some reason
child.Parent = player:WaitForChild ("StarterPack") -- or clone it if adding to StarterGear doesn't clone itself to the backpack
end
end)

that script you have wouldn't save a tool if the player was holding it when they died.
Report Abuse
Zahkrisos is not online. Zahkrisos
Joined: 11 Aug 2009
Total Posts: 962
07 Feb 2015 10:57 PM
That's weird...

The one you gave me doesn't' work either.
Report Abuse
Zahkrisos is not online. Zahkrisos
Joined: 11 Aug 2009
Total Posts: 962
07 Feb 2015 11:15 PM
B1
Report Abuse
Zahkrisos is not online. Zahkrisos
Joined: 11 Aug 2009
Total Posts: 962
09 Feb 2015 05:59 PM
B2
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
09 Feb 2015 08:02 PM
then you might wanna tell me what the output says
either that or it's not working because you're not believing hard enough
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