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
 

Re: How do you use auto welds?

Previous Thread :: Next Thread 
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:34 AM
I need it for my steampunk airship
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:36 AM
B1
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:39 AM
B2
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:46 AM
B3


This is scripting helpers so I figured someone could help me. I'm a noob to scripting so yeah haha.
Report Abuse
Immortalibus is not online. Immortalibus
Joined: 23 Oct 2013
Total Posts: 6421
22 Jan 2014 10:46 AM
You put the script into a model, and when ran, it will add a weld to every part, holding it together.

You can free model some good ones, or make your own.
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:48 AM
I tried that but it falls apart still. Are there any other instructions?
Report Abuse
Immortalibus is not online. Immortalibus
Joined: 23 Oct 2013
Total Posts: 6421
22 Jan 2014 10:50 AM
You must have some faulty autowelds. Try this one:

local prev
local parts = script.Parent:GetChildren()

for i = 1,#parts do
if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then
if (prev ~= nil)then
local weld = Instance.new("Weld")
weld.Part0 = prev
weld.Part1 = parts[i]
weld.C0 = prev.CFrame:inverse()
weld.C1 = parts[i].CFrame:inverse()
weld.Parent = prev
end
prev = parts[i]
end
end

Make sure:
A) It is in a model with the parts: No models inside the model, just the parts and the script. If you have models within the model, ungroup them.
B) It is in a regular script
C) Everything is unanchored
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:51 AM
Thanks!
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:55 AM
Do vehicle seats count?
Report Abuse
Immortalibus is not online. Immortalibus
Joined: 23 Oct 2013
Total Posts: 6421
22 Jan 2014 10:56 AM
They should.

"or (parts[i].className == "VehicleSeat")"
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 10:59 AM
Kk.
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 11:05 AM
won't work. can I give you the ship to edit?
Report Abuse
crazy651 is not online. crazy651
Joined: 16 May 2012
Total Posts: 9684
22 Jan 2014 11:40 AM
Help
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