Why I can't play another tween after previous tween is completed?

So I have a local script tweening gui, with tween.Completed, but it fails, but if I make it like this, it works, do you guys know why?
– Not working using Tween.Completed

button.MouseButton1Click:Connect(function()
	if opened.Value == "home" then
		local tween = TweenService:Create(homeframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Position = UDim2.new(-1, 0, .174, 0)})
		local tweenbutton = TweenService:Create(homebutton, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {BackgroundTransparency = 1})
		local tweentext = TweenService:Create(hometext, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {TextColor3 = Color3.fromRGB(255, 255, 255)})
		local tweenline = TweenService:Create(homeline, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Size = UDim2.new(0,0,0,0)})
		tweenline:Play()
		tweentext:Play()
		tween:Play()
		tweenbutton:Play()
		tween.Completed:Connect(function()
			local tween = TweenService:Create(settingsframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Position = UDim2.new(0, 0, .174, 0)})
			tween:Play()
			local tweenbutton = TweenService:Create(buttonframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 0})
			tweenbutton:Play()
			local tweentext = TweenService:Create(buttontext, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {TextColor3 = Color3.fromRGB(255, 194, 52)})
			tweentext:Play()
			local tweenline = TweenService:Create(buttonline, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Size = UDim2.new(1,0,.07,0)})
			tweenline:Play()
			opened.Value = "settings"
		end)
	end
end)

But if I make it like this, using wait, it works. Sorry for the messy code.

button.MouseButton1Click:Connect(function()
	if opened.Value == "home" then
		local tween = TweenService:Create(homeframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Position = UDim2.new(-1, 0, .174, 0)})
		local tweenbutton = TweenService:Create(homebutton, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {BackgroundTransparency = 1})
		local tweentext = TweenService:Create(hometext, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {TextColor3 = Color3.fromRGB(255, 255, 255)})
		local tweenline = TweenService:Create(homeline, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Size = UDim2.new(0,0,0,0)})
		tweenline:Play()
		tweentext:Play()
		tween:Play()
		tweenbutton:Play()
		wait(.5)
		local tween = TweenService:Create(settingsframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Position = UDim2.new(0, 0, .174, 0)})
		tween:Play()
		local tweenbutton = TweenService:Create(buttonframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 0})
		tweenbutton:Play()
		local tweentext = TweenService:Create(buttontext, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {TextColor3 = Color3.fromRGB(255, 194, 52)})
		tweentext:Play()
		local tweenline = TweenService:Create(buttonline, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Size = UDim2.new(1,0,.07,0)})
		tweenline:Play()
		opened.Value = "settings"
	end
end)

Once you have tween.Completed, you don’t need the wait(.5).

The problem here is that you waited 0.5 seconds before creating that Completed event. That means, when the event is created, your last tween might already be completed during the 0.5 seconds and so the tween won’t be played.

Simplistically, just remove the wait(0.5) because you already have the Completed event there!

The script’s execution is yielded when you wait for a RBXScriptSignal object to fire via calling the instance method “:Wait()” on it. If that signal never fires then the script’s execution is yielded indefinitely.

Sorry , I write wrong here, in the Tween Completed version, I don’t use wait.

Use this for the completed: tween.Completed:Wait()

button.MouseButton1Click:Connect(function()
	if opened.Value == "home" then
		local tween = TweenService:Create(homeframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Position = UDim2.new(-1, 0, .174, 0)})
		local tweenbutton = TweenService:Create(homebutton, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {BackgroundTransparency = 1})
		local tweentext = TweenService:Create(hometext, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {TextColor3 = Color3.fromRGB(255, 255, 255)})
		local tweenline = TweenService:Create(homeline, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Size = UDim2.new(0,0,0,0)})
		tweenline:Play()
		tweentext:Play()
		tween:Play()
		tweenbutton:Play()
		tween.Completed:Wait()
			local tween = TweenService:Create(settingsframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Position = UDim2.new(0, 0, .174, 0)})
			tween:Play()
			local tweenbutton = TweenService:Create(buttonframe, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundTransparency = 0})
			tweenbutton:Play()
			local tweentext = TweenService:Create(buttontext, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {TextColor3 = Color3.fromRGB(255, 194, 52)})
			tweentext:Play()
			local tweenline = TweenService:Create(buttonline, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), {Size = UDim2.new(1,0,.07,0)})
			tweenline:Play()
			opened.Value = "settings"
		end)
	end
end)

The problem was you were connecting completed to a function, which it isn’t a function, most likely causing the following code to terminate.