Tween not showing

Hello! I was working on a script that will increase and decrease a sphere’s size with tween service. The problem is that the first tween worked properly but the second didn’t show. I have put a print code under the second tween code and the print code did work, where is the problem at? Thanks!

Server script:

game.ReplicatedStorage:WaitForChild("LocalServer").OnServerEvent:Connect(function(plr)
	
	local char = plr.Character or plr.CharacterAdded:Wait()
	
	local sphere = game.ReplicatedStorage:WaitForChild("TSSphere"):Clone()
	
	local TweenSerivice = game:GetService("TweenService")
	local info = TweenInfo.new(0.7, Enum.EasingStyle.Circular)
	local goal = {}
	goal.Size = Vector3.new(150,150,150)
	local tween1 = TweenSerivice:Create(sphere, info, goal)
	
	local info2 = TweenInfo.new(0.7)
	local goal2 = {}
	goal.Size = Vector3.new(1,1,1)
	local tween2 = TweenSerivice:Create(sphere, info2, goal2)
	
	sphere.CFrame = char.UpperTorso.CFrame
	sphere.Parent = char
	
	tween1:Play()
	
	tween1.Completed:Connect(function()
		wait(.2)
		tween2:Play()
		print("2 played")
		
		tween2.Completed:Connect(function()
			sphere:Destroy()
		end)
	end)
	
end)

the goal2 table was empty

game.ReplicatedStorage:WaitForChild("LocalServer").OnServerEvent:Connect(function(plr)
	
	local char = plr.Character or plr.CharacterAdded:Wait()
	
	local sphere = game.ReplicatedStorage:WaitForChild("TSSphere"):Clone()
	
	local TweenSerivice = game:GetService("TweenService")
	local info = TweenInfo.new(0.7, Enum.EasingStyle.Circular)
	local goal = {}
	goal.Size = Vector3.new(150,150,150)
	local tween1 = TweenSerivice:Create(sphere, info, goal)
	
	local info2 = TweenInfo.new(0.7)
	local goal2 = {}
	goal2.Size = Vector3.new(1,1,1) --// changed goal to goal2 here
	local tween2 = TweenSerivice:Create(sphere, info2, goal2)
	
	sphere.CFrame = char.UpperTorso.CFrame
	sphere.Parent = char
	
	tween1:Play()
	
	tween1.Completed:Connect(function()
		wait(.2)
		tween2:Play()
		print("2 played")
		
		tween2.Completed:Connect(function()
			sphere:Destroy()
		end)
	end)
	
end)
1 Like

Alright! Thanks! Sorry for the careless mistake :sweat_smile:

1 Like