I'm trying to make a door sliding script that uses tween service to move the door. But when I do use it, the output says it's unable to cast to dictionary. How could I fix this? Thanks.
local goal = script.Parent.Door.Position + Vector3.new(1,0,0)
local function DoorAnim ()
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(5)
local tween = TweenService:Create(script.Parent.Door, tweenInfo, goal)
tween:Play()
end
script.Parent.Model.Part1.SurfaceGui.TextButton.MouseButton1Down:Connect(function()
DoorAnim()
end)
