max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 02:36 PM |
I am trying to weld multiple parts to one handle using a script. When I attempt this it only welds Part8 and all the other parts I attempt to weld just fall down. Is there any solution to this problem? Help would be appreciated!
Here is the script ______________________
weld = Instance.new("Weld") sp = script.Parent
sp.Equipped:connect(function() weld.Part0 = sp.Handle weld.Part1 = sp.Part1 weld.Part0 = sp.Handle weld.Part1 = sp.Part2 weld.Part0 = sp.Handle weld.Part1 = sp.Part3 weld.Part0 = sp.Handle weld.Part1 = sp.Part4 weld.Part0 = sp.Handle weld.Part1 = sp.Part5 weld.Part0 = sp.Handle weld.Part1 = sp.Part6 weld.Part0 = sp.Handle weld.Part1 = sp.Part7 weld.Part0 = sp.Handle weld.Part1 = sp.Part8 weld.Parent = sp.Handle end) |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
| |
|
East98
|
  |
| Joined: 17 Jun 2012 |
| Total Posts: 418 |
|
|
| 05 Sep 2015 02:56 PM |
| You need to create a seperate weld for each part you are welding to the handle. What your script is doing is just changing the Part0 and Part1 properties of ONE weld therefor only welding the last part to the handle |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 02:58 PM |
| I appreciate the help but I am a little confused by what you mean. |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:06 PM |
| How would I make another weld for each part? |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2015 03:10 PM |
The same way you made the first weld
weld = Instance.new("Weld") weld2 = Instance.new("Weld") weld3 = Instance.new("Weld") weld4 = Instance.new("Weld") weld5 = Instance.new("Weld") weld6 = Instance.new("Weld") weld7 = Instance.new("Weld") weld8 = Instance.new("Weld") sp = script.Parent
sp.Equipped:connect(function() weld.Part0 = sp.Handle weld.Part1 = sp.Part1 weld2.Part0 = sp.Handle weld2.Part1 = sp.Part2 weld3.Part0 = sp.Handle weld3.Part1 = sp.Part3 weld4.Part0 = sp.Handle weld4.Part1 = sp.Part4 weld5.Part0 = sp.Handle weld5.Part1 = sp.Part5 weld6.Part0 = sp.Handle weld6.Part1 = sp.Part6 weld7.Part0 = sp.Handle weld7.Part1 = sp.Part7 weld8.Part0 = sp.Handle weld8.Part1 = sp.Part8 weld.Parent = sp.Handle weld2.Parent = sp.Handle weld3.Parent = sp.Handle weld4.Parent = sp.Handle weld5.Parent = sp.Handle weld6.Parent = sp.Handle weld7.Parent = sp.Handle weld8.Parent = sp.Handle end) |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 05 Sep 2015 03:13 PM |
NONONONONONONNO THIS
local = path to your thingy
for Iteration, Part in pairs(yourthingy) do local Weld = Instance.new("Weld") Weld.Parent = yourthingy Weld.Name = "Weld #" .. Iteration Weld.Part0 = yourthingy.Handle Weld.Part1 = Part end |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2015 03:15 PM |
| Didn't really know how to make it more efficient. |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 05 Sep 2015 03:17 PM |
| If you havent learned most aspects of lua then you probably shouldent be helping people. Instead just lurk threads and learn |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:17 PM |
| Thank you for the help, it worked! |
|
|
| Report Abuse |
|
|
|
| 05 Sep 2015 03:20 PM |
| I don't help that often, just when I know I can. |
|
|
| Report Abuse |
|
|
| |
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:38 PM |
| Can anyone help me change the positioning of the parts to the tool because after welding it all the parts position move to the Handle. |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
| |
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:42 PM |
| All the parts are unanchored since before I welded and after. |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 05 Sep 2015 03:43 PM |
Just put this in the handle
http://www.roblox.com/qPerfectionWeld-Perfect-welding-for-EVERY-situat-item?id=181259635 |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:45 PM |
| I would take it but I want to learn how to do it, not use someone's script to do stuff that I want to do myself. |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:45 PM |
If I see it in the forum i usually can understand what it means and learn from it but when it is in a script created by someone else I usually can understand it.
|
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 05 Sep 2015 03:46 PM |
| Then study the script I gave you and recreate it |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:47 PM |
| I have but I can't rearrange the position of the parts. |
|
|
| Report Abuse |
|
|
chimmmihc
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 2420 |
|
|
| 05 Sep 2015 03:48 PM |
I know you havent :)
Look at the script See how it works Recreate it Profit |
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:49 PM |
I have rearrange the script to how I would script it if I knew it at first.
___________________________________
sp = script.Parent tool = sp:GetChildren()
for i, v in pairs(tool) do local Weld = Instance.new("Weld") if v.ClassName == "Part" then Weld.Parent = v Weld.Name = "Weld #"..i Weld.Part0 = sp.Handle Weld.Part1 = v end end
|
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 03:52 PM |
I was trying to figure out how to weld so I was a bit confused at first but after you put your script in this forum I understood I could loop through parts.
|
|
|
| Report Abuse |
|
|
max659
|
  |
| Joined: 01 Nov 2009 |
| Total Posts: 84 |
|
|
| 05 Sep 2015 04:17 PM |
| So is there any way I could change the position of the parts after it's welded? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 05 Sep 2015 04:20 PM |
Shameless advertising:
http://www.roblox.com/magic-welds-item?id=237838970 |
|
|
| Report Abuse |
|
|