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

How would I position a rotated part inside of another part?

Asked by 10 years ago

I need to change the position of a rotated object that is inside another object. But, when I do standard Lua, like

game.Workspace.Part.CFrame = CFrame.new(0, 10, 0)

the rotation is reset, which is something I don't want. And doing something like

game.Workspace.Parent.CFrame = CFrame.new(0, 10, 0) * CFrame.Angles(0, 0, math.pi/4)

just positions the part on top of the part I want it to go in. Can anyone explain how I would position a rotated part inside another part?

Answer this question