so i have this code which pivots a part but when i execute it the rotation gets multiplied

EXAMPLE

Orientation = 20,10,10

when executed Orientation = -19.19, -133.55, -172.61

what i want Orientation = 30,5,10

local ts = game:GetService("TweenService")
local part = workspace.Part
local rot = part.Orientation
local pivot = (part.CFrame * CFrame.new(0,0,part.Size.Z/-2))
local new=pivot*CFrame.Angles(math.rad(10),rot.Y,rot.Z)

part.CFrame = new:toWorldSpace(pivot:toObjectSpace(part.CFrame))

1 comment

0

just set the orientation with Part.Rotation.