✓ Accepted answer
You cannot use the '+' operator with with two CFrames check the CFrame operators.
More information about CFrame rotation can be found here.
Secondly since you only want to add rotation you add it to the existing CFrame e.g:-
p.CFrame = p.CFrame * CFrame.Angles(0, math.rad(10), 0)
Lastly you need to include some form of 'wait' in an infinite loop else it will allow other code to run causing studio / Roblox to crash in most cases.You have also missed the end but this may just be an oversight.
Putting this code together:-
local p = game.Workspace.Part
while true do
wait(0.2)
p.CFrame = p.CFrame * CFrame.Angles(0, math.rad(10), 0)
end
local p = game.Workspace.Part
local cf = CFrame.Angles(0, math.rad(10), 0)
while true do
wait(0.2)
p.CFrame = p.CFrame * cf
end
I hope this helps, please comment if you do not understand how / why this code works.