I’m attempting to tween a model’s primary part with CFrame. I’m using CFrame because the primary part has parts welded to it. I’ve tried looking for the solution in the Dev Forum, but not one worked. Here’s what I’ve got.
--General
local Body = script.Parent.PrimaryPart
local Tween = game:GetService("TweenService")
--Locations and Orientations
local Forward = Tween:Create(Body, TweenInfo.new(7), {CFrame = CFrame.new(-588.802, 126.855, 963.75)})
---What I need help with
local ForwardOrientation = Tween:Create(Body, TweenInfo.new(7), {CFrame = CFrame.Angles(0,math.rad(90),0)})
--What I need help with
local Back = Tween:Create(Body, TweenInfo.new(7), {CFrame = CFrame.new(-295.79, 127.319, 963.217)})
--Loop
wait(5)
while true do
Forward:Play()
ForwardOrientation:Play()
wait(15)
Back:Play()
wait(15)
end
while true do
Forward:Play()
local ForwardOrientation = Tween:Create(Body, TweenInfo.new(7), {CFrame = CFrame.Angles(0,math.rad(90),0)})
ForwardOrientation:Play()