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 problem

Previous Thread :: Next Thread 
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
12 Jan 2017 02:45 PM
function Weld(x,y) local W = Instance.new("Weld") W.Part0 = x W.Part1 = y local CJ = CFrame.new(x.Position) local ## # ##################### local C1 = y.CFrame:inverse()*CJ #### # ## W.C1 = C1 W.Parent = x end for i,v in ipairs(script.Parent:GetChildren()) do if v:IsA("BasePart") and v.Name ~= "Center" then Weld(script.Parent.Center, v) v.Anchored = false end end I have this script that welds every part in a model to the center, but when I change the CFrame of the center, none of these parts are moving along... None of the parts is welded to other objects, whether it be anchored or not, the center however is anchored, but that shouldn't cause any trouble, right?
Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
13 Jan 2017 02:40 AM
Bump.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
13 Jan 2017 02:53 AM
Your script is censored, but yeah so long as every part has a weld attached to the center, it shouldn't fall apart when you CFrame the center, in the same manner that a tool with tons of welds, and one weld between the Handle and the Right Arm doesn't fall apart when the character moves their arm around.

Make sure you're CFraming and not changing the position.


Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
13 Jan 2017 04:29 AM
It's not that important that the script is censored, it's really just a standard script that welds all the parts to one single part. And it's not falling apart, the parts are actually welded, because if I delete the parts, the construction falls apart. I can also see that the Center part is moving, but the parts that are welded to this center part just remain in place.

I have done welding before, exactly like this, only then it worked and now it doesn't and I have no clue why.
Report Abuse
Lucas_Lua is not online. Lucas_Lua
Joined: 18 Jun 2008
Total Posts: 7521
13 Jan 2017 04:31 AM
I think I remember an old visual bug where if you had a bunch of unanchored parts welded to an anchored part, and then changed its position, the parts sometimes didn't update to their new positions visually...

Try unanchoring the center and see what happens.
Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
13 Jan 2017 04:34 AM
When the center part is unanchored, it does seem that it's all welded together, but I can't do it like that because I need the center part to be in that position. I want the whole model to rotate around the center. I used SetPrimaryPartCFrame before, but it was too inconsistent after a while, the offset changed and its performance was a bit bad as well...
Report Abuse
Lucas_Lua is not online. Lucas_Lua
Joined: 18 Jun 2008
Total Posts: 7521
13 Jan 2017 04:35 AM
You could use a BodyPosition and BodyGyro to keep it in the same position.
Report Abuse
HarrySnotte is not online. HarrySnotte
Joined: 27 Jun 2011
Total Posts: 2854
13 Jan 2017 04:37 AM
But the parts have to collide and it goes through some other parts as well...
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