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: Welding script broken

Previous Thread :: Next Thread 
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 08:51 PM
This welding script of 'mine' fails utterly to weld together a model, when before it worked fine. Before as in, before summer. function ################ -- Modified by me, found in a free model -- model = ############################### local function weld(x, y) local Weld = Instance.new("Weld") --Creates a weld-- Weld.Part0 = x Weld.Part1 = y local ################# local ## = ################## local ## # ################## ### local C1 = y.CFrame:inverse() ### ####### # ## Weld.C1 = C1 Weld.Parent = x Weld.Name = "Weld" --The name on the Weld-- end -- End of copied part -- for _, child in ipairs(model:GetChildren()) do print(child.Name) if child:IsA("BasePart") then local a = child local b; if b == nil then b = child end weld(a, b) print("Welded") local b = child end end end Pastebin, ########
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
07 Sep 2016 08:52 PM
i am having same problem pls help

am i supposed to include hashes in script?
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 08:52 PM
I'm not loving roblox's filter right now.

Pastebin
/Sanwf3er
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 09:10 PM
Do not include the number signs in the script.
Report Abuse
CaptainGector is not online. CaptainGector
Joined: 02 May 2014
Total Posts: 487
07 Sep 2016 09:56 PM
Bump
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
07 Sep 2016 10:38 PM
function weldModel(model)
-- Modified by me, found in a free model --
local descendants = {model}
model:BreakJoints()
local parts = {}
for _, descendant in ipairs(descendants) do
for _, child in ipairs(descendant:GetChildren()) do
descendants[#descendants+1] = child
parts[#parts+1]=child:IsA("BasePart") and child or nil
end
end
print(#parts)
local main = parts[1]
for i = 2, #parts do
local weld = Instance.new("Weld", main)
weld.Part1 = parts[i]
weld.C1 = weld.Part1.CFrame:inverse()*main.CFrame
weld.Part0 = main
end
end
weldModel(workspace["Pine Tree"])
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