local tweeninfo = TweenInfo.new(8,Enum.EasingStyle.Linear, Enum.EasingDirection.In,0,false,0) local vectorlookat = Instance.new("Vector3Value", script.Parent) vectorlookat.Value = goal local vectorvalue = Instance.new("Vector3Value", script.Parent) vectorvalue.Value = script.Parent.Position local tween = ts:Create(vectorvalue, tweeninfo, {Value = goal}) tween:Play() vectorvalue.Changed:Connect(function() if (script.Parent.Position - goal).magnitude > 1 then -- Error here local position = vectorvalue.Value script.Parent.Parent:SetPrimaryPartCFrame(CFrame.new(position, vectorlookat.Value)) end end) tween.Completed:Wait() vectorlookat:Destroy() vectorvalue:Destroy() print("Moving tween sucess!")
Help plz