TweenService:Create failed because Instance is null

Hi,
So I’m making a tween, with a clone, and then there comes this error: TweenService:Create failed because Instance is null
LG ~ maini

Please give me a script to work with.

Hi! try with this

game:getService("TweeenService"):Create("HERE PART",Tween.Info("SECONDS HERE"),{"HERE CHANGE HERE PROPERTIES"}):Play()

Okay, sorry. Its two scripts. One local script inside a button:

local player = game.Players.LocalPlayer

local rs = game:GetService("ReplicatedStorage")
local remoteevent = rs.RemoteEvents.Buy

local objectname = "Table"
local price = 100
local lowerprice = 99 --Muss eine Zahl kleiner sein als der Preis!

script.Parent.MouseButton1Up:Connect(function()
	if player.leaderstats.MoneyOnHand.Value > lowerprice then
		player.leaderstats.MoneyOnHand.Value = player.leaderstats.MoneyOnHand.Value - price
		script.Parent.Text = "bought"
		script.Parent.BackgroundColor3 = Color3.new(1, 0.380392, 0.380392)
		
		local buyinfo = game.ReplicatedStorage.Gui.ComputerBuy.Buy:Clone()
		
		buyinfo.Message.Text = player.Name .. " just buyed [" .. objectname .. "]! (-$" .. price .. ")"
		buyinfo.Parent = player.PlayerGui.Game.Commands
		
		wait(5)
		buyinfo:Destroy()
		
		wait(5)
		local part = game.Workspace.Car
		remoteevent:FireServer(part)
		wait(4)
		game.ReplicatedStorage.Buy.Package.Package_Banana2.Parent = game.Workspace
		wait(22)
		part:Destroy()
	end
end)

And the second one is a script inside ServerScriptService:

local TweenService = game:GetService("TweenService")
local rs = game:GetService("ReplicatedStorage")
local remoteevent = rs.RemoteEvents.Buy

remoteevent.OnServerEvent:Connect(function(player,part)
	local goal = {}

	goal.Position = Vector3.new(-754.505, 6.586, -111.39)
	local tweenInfo = TweenInfo.new(4)
	local tween = TweenService:Create(part, tweenInfo, goal)
	tween:Play()
	wait(4)
	
	wait(2)
	
	local goal2 = {}
	
	goal2.Position = Vector3.new(-1076.395, 6.586, -111.39)
	local tweenInfo2 = TweenInfo.new(6)
	local tween2 = TweenService:Create(part, tweenInfo2, goal2)
	tween2:Play()
	wait(6)
	part.Position = Vector3.new(-514.166, 6.586, -111.39)
end)

If you clone an object.
Make sure you parent the object before Tweening as when cloning. The Parent is automatically set to nil

Thank you so much!!! Its working :slight_smile: