When using Tween my part is not Rotating Correctly?

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


1 Like

Why not just copy the GoTo's CFrame and use that?

2 Likes

As you have both blocks set up, you could just use PartRot2.CFrame as goal. That should make the grey part rotate into the red part (if that’s what you wanted)

2 Likes

thanks it was a simple mistake xD, i just had to set the CFrame to the PartRot2

local PartRot2 = script.Parent.Parent.GoTo.CFrame

local goal = {
	CFrame = PartRot2
       }
1 Like