I'm confused about c0 and c1

So I saw that:

part1.CFrame = part0.CFrame:ToWorldSpace(c0):ToWorldSpace(c1)

But when I tested this i didn’t go as expected:

local weld = script.Parent.Weld
local part1 = script.Parent
local part0 = script.Parent.Parent.Part0

print(part0.CFrame:ToWorldSpace(weld.C0).Position)
print(part1.CFrame.Position)

wait(5)

weld.C0 = CFrame.new(0, 1, 0)

print(part0.CFrame:ToWorldSpace(weld.C0).Position)
print(part1.CFrame.Position)

Following that equation at the top, I thought that the y position of part1 should be 1 higher than it originally was. But when I check, the y position is one lower instead. Can anyone explain what I’ve misunderstood here?

hmm I’ve never had this problem before here.

try this

local weld = script.Parent.Weld
local part1 = script.Parent
local part0 = script.Parent.Parent.Part0

print(part0.CFrame:ToWorldSpace(weld.C0).Position)
print(part1.CFrame.Position)

wait(5)

weld.C0 = CFrame.new(0, -1, 0)

print(part0.CFrame:ToWorldSpace(weld.C0).Position)
print(part1.CFrame.Position)

signed,
X

I found what I did wrong. Part0 of the weld was set to Part1 instead of Part0 lol. So it did the opposite of what it should. The plugin I welded them with said that the parts selected weld to the first part I click, but it was welded to the last one instead. Oops.

2 Likes