Advertisement
Previized

Weld Script [ROBLOX]

Jul 10th, 2017
4,775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. --@author FiredDusk (aka Previized)
  2.  
  3. --[[ NOTES:
  4.    
  5.     1. Make sure in both parts, or all parts, "Archored" and "CanCollide" are false (unchecked)
  6.    
  7. --]]
  8.  
  9. local MainPart = script.Parent.Main -- The main part that holds the weld
  10.  
  11. for i,Part in pairs(script.Parent:GetChildren()) do
  12.     if Part:IsA('Part') or Part:IsA('WedgePart') or Part:IsA('UnionOperation') or Part:IsA('MeshPart') or Part:IsA('CornerWedgePart') or Part:IsA('TrussPart') or Part:IsA('NegateOperation') then
  13.         local Weld = Instance.new('Weld',MainPart)
  14.         Weld.C0 = MainPart.CFrame:toObjectSpace(Part.CFrame)
  15.         Weld.Part0 = MainPart
  16.         Weld.Part1 = Part
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement