Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I can't seem to change the weld's C0? [Fixed it]

Asked by
acecateer 130
9 years ago

Here's the code that I write to connect the right arm to the head and then the fake arm to the real arm.

local WeldRA=Instance.new("Weld",Character["Right Arm"])
WeldRA.Part0=Character.Head
WeldRA.Part1=Character["Right Arm"]
--WeldRA.C0=CFrame.new(0.900085449, -1.25, -0.200766563, 0.965925872, 0.258818865, 9.97472171e-007, -0.000130528526, 0.000490993261, -0.999999523, -0.258818775, 0.965925455, 0.000507998513)
WeldRA.C0=CFrame.new(0.900085449, -1.25, -0.4)*CFrame.Angles(math.rad(-265), 0, 0)

local fakearm1 = Character["Right Arm"]:Clone()
fakearm1.Parent = ArmsContainer
fakearm1.Name = "RA"
local Weld = Instance.new("Weld", Character["Right Arm"])
Weld.Part0 = fakearm1
Weld.Part1 = Character["Right Arm"]
Character["Right Arm"].Transparency = 1

What I'm trying to do is change the way the right arm is attached to the head by changing the C0 of it. But when I try to change it after I set it the first time it doesn't do anything but it does get to the print after changing it...

function ReloadSequence()
    WeldRA.C0 = CFrame.new(0.900085449, -1.25, 0.5)*CFrame.Angles(math.rad(-300), 0, 0)
    print'It went through...'
end

It doesn't change the C0 yet it prints "It went through" anyways. Am I doing something wrong?

No one answered this, oh well. I fixed it myself anyways.

Answer this question