You cannot use variables for property names, and you cannot change the pivot variables of a model, use CFrame instead. Here is a code snippet if you are looking to tween a model:
local tweenService = game:GetService(“TweenService”)
local info = TweenInfo.new()local function tweenModel(model, CF)
local CFrameValue = Instance.new(“CFrameValue”)
CFrameValue.Value = model:GetPivot()CFrameValue:GetPropertyChangedSignal(“Value”):Connect(function()
model:PivotTo(CFrameValue.Value)
end)local tween = tweenService:Create(CFrameValue, info, {Value = CF})
tween:Play()tween.Completed:Connect(function()
CFrameValue:Destroy()
end)
end
From post: Any way to tween a model via TweenService? - #9 by tunicus, changed deprecated functions GetPrimaryPartCFrame and SetPrimaryPartCFrame.
If you are looking to move a rig with a humanoid, you may be able to use humanoid:MoveTo() Instead.