How to set a fixed angle (non additive) using Cframe?

If I repeat this sentence many times:

workspace.Part.CFrame = workspace.Part.CFrame * CFrame.Angles(0, math.rad(1), 0)

ā€¦ each time I run this sentence, 1 degree will be ADDED to the current Y orientation.

How can I set a fixed angle using CFrame, like Part.Orientation = Vector3.new(0, math.rad(1), 0)?

try making a variable that is outside the loop

local cf = workspace.Part.CFrame
game["Run Service"].Stepped:Connect(function()--your loop here
   workspace.Part.CFrame= cf*CFrame.Angles(0,math.rad(1),0)
end) 
1 Like

You need to get rid of the rotation first.

p.CFrame = CFrame.new(p.CFrame.Position) * CFrame.Angles(blah

2 Likes