I used
model :SetPrimarayPartCFrame(CFrame.new(45, math.deg(0) 0) print ("Rotated")
It moved the model to another position instead of just rotating it
You should look at the contents of what CFrame actually is: http://wiki.roblox.com/index.php?title=CFrame
The first three values you have in your CFrame.new
are a Vector3 value for position.
In order to change the angles you would need to multiply your CFrame (keeping the position) by EulerAngles
.
model:SetPrimaryPartCFrame(model.PrimaryPart.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(45), 0, 0))