Moving weld part

Hello, is there a way to make a welded part tween move?If yes can you help me Please?

2 Likes

I need that for doing one side resizing.

you should follow the format before posting. People would ask for a video of the problem, or the code, etc.

This not a category just to get someone to code the whole thing for you. You have to have something to show us like a code or some type of evidence of a script or a video that you have. If you need help go to the developer hub its really useful source on scripting.

3 Likes

Using Tweens won’t work. You’ll have to use some sort of loop to get it to move.

1 Like

Your problem is vague and uninformative, just make sure only the part your tweeting is anchored, and everything else is not and you should be fine.

I think you tried to say u will be redoing parts, if so re-create the welds as I believe welds are broken when connected parts are resized (although this is only from using welds in studio edit mode so do confirm)

1 Like

To move a welded part, you can move the C0 of the weld. For example, PartA.Weld.C0 = PartA.Weld.C0*CFrame.new(1,0,0). This example adds shifts the weld’s CFrame by one stud on the x-axis.

AxisAngle wrote an incredible article about Cframes. It’s worth a look or two.

5 Likes

Ahahah let someone get the entire code it’s the last thing i want to do, lemme send the image.
Of the code.

So, i need to put something that moves the CFrame of that welded RightArm and another part that i created called LeftArm, how to setup a weld in a neutral position too?

Ugh, i tried fix it with this code,(weld.C0 = weld.P1.CFrame) and the inverse, is it right?


Here’s the result:
https://gyazo.com/1d67819c24237ad64b9206d218d28c7a

2 Likes

Okay, you all know the Welds properties, right? If not, I recommend you watch them. You can also get the CFrame from an already fused part, you have to do that:

local TweenService = game:GetService("TweenService")
local Weld = YourWeld
local Part0
local Part1
local Tween0
local Tween1

spawn(function()
    if not Part0 == nil then
        Part0 = Weld.Part0
        Tween0 = TweenService:Create(
             Part0,
            TweenInfo.new(5),
            {CFrame = CFrame,new(50,50,50)}
        )
    end

    if not Part1 == nil then
        Part1 = Weld.Part1

        Tween1 = TweenService:Create(
             Part1,
            TweenInfo.new(5),
            {CFrame = CFrame,new(45,50,45)}
        )
    end
Tween0:Play()
Tween1:Play()
end)
5 Likes

So, basically, this moves parts tweening?
It won’t work, I already tried that simple cframe, I need to set C0 or C1

1 Like

I hope it, try it out. And see if this work.

1 Like

I already tried simple cframes it won’t work, just C0 C1 will work.

1 Like

Then why not delete the Weld, tween and then rewelding the originaly welded Parts?

1 Like

I need them to tween. So while tweening they would fall.

1 Like

That worked, tweening C0, but look the unexpected result…

@jcnruad900, then why not delete the Weld, Anchor the Weldeds Parts else they will be fall , tween, Redisanchor the Parts and then rewelding the originaly welded Parts?

1 Like

Here’s the biggest problem I cannot anchor them because they have to move with player.

1 Like

But that system worked, look the GIF, i just want knowhow to let that go linear and not randomly.

1 Like