Use :PivotTo() in tween

I want to rotate my character to a certain angle with tweening. Anyone know how?

As in degrees/radians, or to face another part?

First off, you can only Tween/Interpolate properties. Model:PivotTo() is a method that sets the primary part’s cframe to a goal. Rotating your character should be as simple as just rotating your root part’s cframe, i.e

local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")

local player: Player = Players.LocalPlayer
local character: Model = player.Character or player.CharacterAdded:Wait()

local root = character:WaitForChild("HumanoidRootPart")

local function rotateCharacter(degrees: number): Tween
	return TweenService:Create(
		root,
		TweenInfo.new(1),
		{CFrame = root.CFrame * CFrame.Angles(0, math.rad(degrees), 0)}
	):Play()
end


local function Runtime()
	local degrees = 90
	
	local track = rotateCharacter(degrees)
	track.Completed:Wait()
	
	print(("Rotated %s %s"):format(player.Name, degrees))
end


Runtime()

AFAIK tweens can’t call functions, they can only lerp the properties of objects. If this is client-side, you can create a part in the workspace that is positioned same as the humanoid root part, then tween the part with the rotation you want, and bind to the render step. Then in the render step callback, update the character via PivotTo to align with the tweening part’s position.

You can achieve this by tweening a NumberValue across a percentage range from 0 to 1 and hooking NumberValue.Changed:Connect() function to apply the changed value as a percentage to a CFrame or Vector3 or anything you desire, like this:

local OriginPosition = Model:GetPivot().Position;
local function tweenNumberValue(t:number,es:Enum,ed:Enum,reverse:boolean)

	local nv = Instance.new("NumberValue");
	nv.Value = 0;
	nv.Changed:Connect(function(Progress)
		local cFrame = CFrame.fromAxisAngle(Vector3.new(0,1,0),2*math.pi*Progress);
		local moveOffset = Vector3.new(50*Progress,0,0);
		Model:PivotTo(cFrame + OriginPosition + moveOffset);
	end)

	local info = TweenInfo.new(t or 1,es,ed,0,reverse,1);
	local tween = game.TweenService:Create(nv,info,{Value=1});
	tween:Play();
	tween.Completed:Wait();
	tween:Destroy();
	nv:Destroy();
	info = nil;

end

wait(5);

local EnumStyles = Enum.EasingStyle:GetEnumItems();
for i=1, #EnumStyles do
	
	Model.BillboardGui.TextLabel.Text = EnumStyles[i].Name;
	tweenNumberValue(2,EnumStyles[i],Enum.EasingDirection.In,true);
	
end

Example place here if you want to see the code working for all EasingStyles. This example tweens the position and rotation of a model.

TweenValueExample.rbxl (42.5 KB)