I’ve been having some issues with continuously spinning a part via CFrames (I need to do it with CFrames to update the welds I have attached).
I have the following code:
local function SpinPart(part)
local TempTweenInfo = TweenInfo.new(
part:WaitForChild("RotationSpeed").Value,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
-1
)
local RotationVector = part:WaitForChild("RotationVector").Value
local TempTween = TweenService:Create(part, TempTweenInfo, {CFrame = part.CFrame * CFrame.Angles(RotationVector.X, RotationVector.Y, RotationVector.Z)})
TempTween:Play()
end
RotationVector is a Vector3Value in the part which shows its intended orientation destination
RotationSpeed is a IntValue in the part which shows the tween duration
But it makes the spin bricks do some interesting spinning:
No, but as part of my debug process I changed it to: CFrame.Angles(math.rad(RotationVector.X), math.rad(RotationVector.Y), math.rad(RotationVector.Z))})
And the part didn’t rotate at all.