Hello
Which is the easiest way to make the cframe of part’s pivot to be the same as another’s part’s cframe?
Thanks in advance
Hello
Which is the easiest way to make the cframe of part’s pivot to be the same as another’s part’s cframe?
Thanks in advance
You could just do this:
local yourpart1 = workspace.yourpart1
local yourpart2 = workspace.yourpart2
yourpart1.CFrame = yourpart2.CFrame
so like this is the easyest way i know of to pivot a CFrame to another part.
Hey, DevLama.
What your code does is it just teleports yourpart1
to yourpart2
.
To set the pivot of a part to another part’s CFrame, you do this:
-- Declare variables
local part = workspace.PartOne
local partTwo = workspace.PartTwo
-- Set the pivot position of part
part.PivotOffset = partTwo.CFrame:Inverse() * part.CFrame
You’re welcome! : )
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.