I’ve been trying to do this for a while. I can’t figure out how to do it.
Tween the Orientation property of their HumanoirdRootPart to the desired value.
local HRP = THEHRPHERE -- Change this
local Orientation = HRP.Orientation + Vector3.new() -- New orientation vector3 (in degrees)
-- Tween stuff here
Alternatively, you could tween the CFrame as
local HRP = THEHRPHERE -- Change this
local CFrame = HRP.CFrame * CFrame.Angles() -- New orientation vector3 (in radians, use math.rad() to convert degrees to radians)
-- Tween stuff here
The orientation method would be preferable, as it will not force the character position to stay the same during the tween (unless you want that)
I hope this is helpful!
1 Like
With the orientation method:
local TurnAround = TweenService:Create(HumanoidRootPart, TweenInfoTurnAround, {
Orientation = HumanoidRootPart.Orientation + Vector3.new(0, 180, 0)
})
TurnAround:Play()
If the player’s orientation changes during the tween it may mess up like that. You could lerp the CFrame instead.