I am making a racing type game where I need moving Parts, for this I have used Tween Service
But when I run it, it moves the the correct place but is not rotating to the correct place
(Video Wont Upload Some Reason)
I have tried Adding * CFrame.Angles(0,math.rad(PartRot2),0)
The position of the part is moving but its not rotating correctly
local TweenService = game:GetService('TweenService')
local part = script.Parent --The basepart that will be tweened.
local Time = 3
local info = TweenInfo.new(
Time,
Enum.EasingStyle.Linear ,
Enum.EasingDirection.Out,
0,
true,
0
)
local PartPos = script.Parent.Parent.GoTo
local PartRot2 = script.Parent.Parent.GoTo.Orientation.Y
local goal = {CFrame = PartPos.CFrame * CFrame.Angles(0, math.rad(PartRot2), 0)}
while true do
local Tween = TweenService:Create(part,info,goal)
Tween:Play()
wait(Time * 2)
end