Problem with Tweening a model

local pp = script.Parent
local door = workspace.Door

local tweenservice = game:GetService(“TweenService”)
local tweeninfo = TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut, 0)

pp.Triggered:Connect(function()
tweenservice:Create(door, tweeninfo, {Position = Vector3.new(1.985, 9.816, 76.993)}):Play()
end)

i have a problem with my script, everytime i try to tween a model it gives an error TweenService:Create no property named ‘Position’ for object ‘Door’ but it works if i tween with a part, what should i do to fix this

Please when pasting code put triple backticks (`) at the start and end of the code.
Anyways, models don’t have a position value, only CFrame so you need to tween that instead

tweenservice:Create(door, tweeninfo, {CFrame = CFrame.new(Vector3.new(1.985,9.816,76.993))}):Play()
2 Likes

If you are trying to tween a model make sure you are using proper values, a model’s cframe is named “WorldPivot”

Does your door Model have a PrimaryPart set in the Properties?

You don’t to move a primary part if you just use World Pivot

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.