A model has a movement function called SetPrimaryPartCFrame, and I do not know how to integrate this into a TweenService Goals Dictionary, For instance this is a TweenService I made with a part called Part1
local TweenService = game:GetService("TweenService")
Part = game.Workspace.Part1
local Info = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
X = Part.CFrame.X
Y = Part.CFrame.Y+1
Z = Part.CFrame.Z
local Goals =
{
--#1
CFrame = CFrame.new(X,Y,Z)
}
local MovePart = TweenService:Create(Part, Info, Goals)
MovePart:Play()
Lets say I now have a model named "Model1" in the workspace, there are two children: "Part1","Part2" - "Part1" is the Primary Part of "Model1"
local TweenService = game:GetService("TweenService")
Model = game.Workspace.Model1
PrimaryPart = Model.Part1
local Info = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
X = PrimaryPart.CFrame.X
Y = PrimaryPart.CFrame.Y+1
Z = PrimaryPart.CFrame.Z
Angle = PrimaryPart.Orientation
local Goals =
{
--#2
--How would I use :SetPrimaryPartCFrame with "Model1"
--This is how SetPrimaryPartCFrame is sopposed to work:
--Model:SetPrimaryPartCFrame(CFrame.new(X,Y,Z)*Angle)
}
local MovePart = TweenService:Create(PrimaryPart, Info, Goals)
MovePart:Play()
How do I use SetPrimaryPartCFrame in #2 with TweenService like #1 but with a function?
