How would I set a CFrame's orientation?

I am making a placing system and I have a main part that all the other parts are welded to and I change the CFrame of that part to that CFrame that my script puts out but I cant figure out how to change the rotation of the object its always just 0,0,0

1 Like

Like this?

local rotation = 90
part.CFrame = part.CFrame:ToObjectSpace(CFrame.Angles(0, math.rad(rotation), 0))
5 Likes

You could use CFrame.Angles() with the parameters being math.rad. This allows your part to rotate.

For further explanation to this, click here.

11 Likes