How do I change CFrames position and orientation?

Hello! I have a orientation variable and position variable. The position is a vector3 and I need to know how to set a CFrames position and orientations. How can I do this?

Why’d I post this right before I go to sleep… -_-

please research before posting.

edit: basically just do

pos = Vector3.new(0, 5, 0) -- position
rot = Vector3.new(0, 5, 0) -- orientation
local cf = CFrame.new(pos) * CFrame.Angles(rot.x, rot.y, rot.z)
part.CFrame = cf
1 Like

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