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 » Scripting Helpers
Home Search
 

DROPTOOLONDEATH? D:

Previous Thread :: Next Thread 
nate9790 is not online. nate9790
Joined: 11 Sep 2010
Total Posts: 67
23 Sep 2013 08:59 PM
How do i make a drop tool on death or if there is one i could use? :)? Thanks for your time.
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
23 Sep 2013 09:07 PM
http://wiki.roblox.com/index.php/Died_(Event)

Pair this with Clone()
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
23 Sep 2013 09:14 PM
tool=script.Parent
tool.Equipped:connect(function(mouse)
Character=tool.Parent
end)
Character.Humanoid.Died:connect(function()
tool:Destroy()
end)
Report Abuse
Landin is not online. Landin
Joined: 04 Mar 2008
Total Posts: 156
23 Sep 2013 09:17 PM
Is there a way to do this for certain tools?
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
23 Sep 2013 09:54 PM
Yeah put my script in each one u want it to happen on.
Report Abuse
Landin is not online. Landin
Joined: 04 Mar 2008
Total Posts: 156
23 Sep 2013 10:00 PM
Alright thanks for clarifying
Report Abuse
nate9790 is not online. nate9790
Joined: 11 Sep 2010
Total Posts: 67
24 Sep 2013 02:47 PM
Thanks
Report Abuse
nate9790 is not online. nate9790
Joined: 11 Sep 2010
Total Posts: 67
27 Sep 2013 08:07 PM
none of this works
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
27 Sep 2013 08:36 PM
Here's an untested, but most likely working snippet you could prefix your tool script with:

    local tool=script.Parent
    tool.Equipped:connect(function()
        local h=tool.Parent:FindFirstChild'Humanoid'
        if h and h.ClassName=="Humanoid" then
            h.Died:connect(function()
                tool.Parent=workspace
            end)
        end
    end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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