I’m trying to move two Models with TweenService but I’m having an error “Attempt to perform arithmetic (add) on number”
For each PrimaryPart, Anchored = true and CanCollide = false
For the rest of the parts in my models, Anchored = false and CanCollide = true
local TweenService = game:GetService("TweenService")
local function PanelA()
local TweenInfo = TweenInfo.new(
15,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
local Selection = game.Workspace.PanelA
local SelectionRoot = Selection.PrimaryPart
local Tween = TweenService:Create(SelectionRoot, TweenInfo, {CFrame = SelectionRoot.CFrame + Vector3.new(-105.506, 9.231, 0)})
Tween:Play()
end
local function PanelB()
local TweenInfo = TweenInfo.new(
14,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
local Selection = game.Workspace.PanelB
local SelectionRoot = Selection.PrimaryPart
local Tween = TweenService:Create(SelectionRoot, TweenInfo, {CFrame = SelectionRoot.CFrame + Vector3.new(-211.012, 18.462, 0)})
Tween:Play()
end
PanelA()
PanelB()