very simple problem
how do I make a player’s rotation tween to a certain direction?
very simple problem
how do I make a player’s rotation tween to a certain direction?
Use CFrame.Angles so that you can rotate them.
Code:
--//Services
local TweenService = game:GetService("TweenService")
--//Variables
local Character = script.Parent
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
--//Functions
local rotationTween = TweenService:Create(HumanoidRootPart, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {
CFrame = HumanoidRootPart.CFrame * CFrame.Angles(0, math.rad(90), 0)
})
rotationTween:Play()
math.rad(90) is the angle that it rotates by.