CFrame add coordinates relative to part

how do i move a part up relative to the rotation of the part?

image

part.CFrame *= CFrame.new(0, howManyStudsToMoveUp, 0)

When you have a world space cframe cf and a CFrame offsetCf defined in local space of this cf, the result of cf * offsetCf is a world space CFrame that is got by moving along and rotating around the axes of cf, starting from cf, the amounts speicified by offset.

1 Like

How about this?

model:PivotTo(CFrame.new(part.Position.X, part.Position.Y + 2, part.Position.Z) * part.CFrame.Rotation)

I haven’t used pivots but if I understood correctly how they work, then this might work. This should move model in the direction of part.CFrame.UpVector.

model:PivotTo(model:GetPivot() + part.CFrame.UpVector * 2)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.