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
 

Tool's weld script breaks when reequipped

Previous Thread :: Next Thread 
radioactivated is not online. radioactivated
Joined: 05 Sep 2009
Total Posts: 1181
20 Sep 2014 09:30 PM
I made a crowbar from two parts, and used a weld plugin to weld them. After adding some code to wait for dependencies, the tool fails to weld when I equip it for a second time. Why might this be so?
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
20 Sep 2014 09:34 PM
Try re-welding them every time the Equipped function is called.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
20 Sep 2014 09:35 PM
*event, sorry
Report Abuse
radioactivated is not online. radioactivated
Joined: 05 Sep 2009
Total Posts: 1181
21 Sep 2014 06:39 AM
I added a

script.Parent.Equipped:connect(function()
reweld()
end)

to the weld scripts, and the tool still breaks when reequipped. Are there other reasons why it might break?
Report Abuse
radioactivated is not online. radioactivated
Joined: 05 Sep 2009
Total Posts: 1181
21 Sep 2014 08:29 AM
bump
Report Abuse
radioactivated is not online. radioactivated
Joined: 05 Sep 2009
Total Posts: 1181
21 Sep 2014 09:59 AM
bump
Report Abuse
lordrambo is not online. lordrambo
Joined: 16 Jun 2009
Total Posts: 20628
21 Sep 2014 10:05 AM
Well I don't know what the issue is but

script.Parent.Equipped:connect(function()
reweld()
end)

basically you have an anonymous function that calls a function. Just do:
script.Parent.Equipped:connect(reweld)
Report Abuse
radioactivated is not online. radioactivated
Joined: 05 Sep 2009
Total Posts: 1181
21 Sep 2014 12:13 PM
Now, when I use it to hit anything, it seems to welding fails yet again.
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