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: Weld Script Help

Previous Thread :: Next Thread 
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
24 Nov 2012 02:52 AM
Is there any way I can make it so that serten parts/models are not welded to the body with a serten name ?

Like if I call a part/model inside a car then it will not be welded to the body.

function Weld(x,y)
local W = Instance.new("Weld")
W.Part0 = x
W.Part1 = y
local CJ = CFrame.new(x.Position)
local C0 = x.CFrame:inverse()*CJ
local C1 = y.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = x
end

function Get(A)
if (A.className == "Part") or (A.className == "Seat") or (A.className == "WeggePart") or (A.className == "CornerWeggePart") then
Weld(script.Parent.MainPart, A)
else
local C = A:GetChildren()
for i=1, #C do
Get(C[i])
end
end
end

function Finale()
Get(script.Parent)
end

Finale()
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
24 Nov 2012 03:25 AM
what is serten?
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