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: Can I get an weld example?

Previous Thread :: Next Thread 
Salvestroni2 is online. Salvestroni2
Joined: 25 Jul 2013
Total Posts: 12483
23 Aug 2017 03:04 PM
??
Report Abuse
Scriptacity is not online. Scriptacity
Joined: 01 Mar 2011
Total Posts: 855
23 Aug 2017 03:04 PM
weld.Part0 = game.Workspace.Part1;
weld.Part1 = game.Worspace.Part2;

weld.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,0,0)


Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
23 Aug 2017 03:05 PM
local base = script.Parent.basepart
local p = script.Parent:GetChildren()
for i = 1, #p do
if p[i]:IsA("BasePart") then
local w = Instance.new("Weld", p[i])
w.Part0 = p[i]
w.Part1 = base
w.C0 = CFrame.new()
w.C1 = base.CFrame:inverse() * p[i].CFrame
p[i].Anchored = false
end
end

i made this one to weld all the parts of a model to a central part in the model, called "basepart".


Report Abuse
carson1056 is online. carson1056
Joined: 13 May 2014
Total Posts: 284
23 Aug 2017 03:07 PM
Weld? If you want to weld for example 2 blocks together, each 1X1X1 the old-style way, go to the top Studio bar and click that surface wand thing, click "Weld" and click the top of ################ ################ ################ ################### of another and stick them together. You have to be on at least an 0.1 stud grid in order for it to be accurate. The other way in doing it is using a script weld. Usually MasterWeld and qPerfectionWeld works best.
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
23 Aug 2017 03:10 PM
local Base = ???
for i,v in next, script.Parent:GetChildren() do
local Weld = Instance.new("Weld")
Weld.Part0 = v
Weld.Part1 = Base
Weld.C0 = Base.CFrame:toObjectSpace(v.CFrame)
Weld.Parent = v
end

i thunk
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