Tweens not displayed

Greetings,

I’m @Vikko151, a medium level developper that is developping a recreation of one of my old games. I wanted to make a new fancy menu for initiating and developping my UIs skills. I haven’t got any problems on the GUI’s creation and everything worked kind of pretty good. Until today, when I was creating my effect when I click a button.

My principal goal was that the button be green with a “Quad” tween and some milleseconds after being back at his basic color. Instead of that, this happened :

My only attempt of fixing was to remove the tween, but personally, the effect wasn’t looking very good…

After all, I think that for getting rid of this issue, I need a bit of help of someone else. If you would be volounteer, can you inspect this script please ?

TS = game:GetService("TweenService")
IsClicking = false

local function MouseClickedButton(Button)
	if IsClicking == true then return end
	IsClicking = true
	local Times = 0
	local BaseColor = Button.Parent.OutLine.BackgroundColor3
	Hovered = false
	Button.Parent.Parent.Parent.Parent.MessageBox.Message.Text = ""
	Button.Parent.OutLine.UIGradient.Offset = Vector2.new(0,0)
	TS:Create(Button.Parent.OutLine,TweenInfo.new(0.7,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0),{ BackgroundColor3 = Color3.new(0,255,0) } ):Play()
	TS:Create(Button.Parent.TextButton,TweenInfo.new(0.7,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0),{ BackgroundColor3 = Color3.new(0,255,0) } ):Play()
	Sounds.PressSound:SetAttribute("IsPlaying",true) -- Ingnore this part, I'm still developping it.
	repeat
		Times = Times + 1
		if Times == 5 then
			TS:Create(Button.Parent.OutLine,TweenInfo.new(0.7,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0,false,0),{ BackgroundColor3 = BaseColor } ):Play()
			TS:Create(Button.Parent.TextButton,TweenInfo.new(0.7,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0,false,0),{ BackgroundColor3 = Color3.new(255,255,255) } ):Play()
		end
		TS:Create(Button.Parent.OutLine.UIGradient,TweenInfo.new(0.1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{ Offset = Vector2.new(0,4) } ):Play()
		wait(0.1)
		Button.Parent.OutLine.UIGradient.Offset = Vector2.new(0,-4)
		TS:Create(Button.Parent.OutLine.UIGradient,TweenInfo.new(0.1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{ Offset = Vector2.new(0,0) } ):Play()
		wait(0.1)
	until Times == 7
	wait(1)
	IsClicking = false
end

Figure out that the script has been simplified for fixing purposes.

I trough that the problem was only here, but actually, the problem is now (almost) everywhere. Look now the next part of the script :

	TS:Create(StartScreen.Layer,TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{ BackgroundTransparency = 0 } )
	wait(1.1)
	MainFrame.Visible = false
	Camera.CameraSubject = Cameras.Camera2
	Camera.CameraType = "Scriptable"
	Camera.CFrame = Cameras.Camera2.CFrame
	TS:Create(StartScreen.Layer,TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{ BackgroundTransparency = 1 } ):Play()
	wait(1)
	IsClicking = false

Be attentive to the video, here is the big problem :

Actually, my tweens doesn’t… work. It’s really a miserable issue and I really want to get rid of it. I am getting stuck with those beep of tweens that don’t show when you’re asking, and I’m soon requiring an emergency help.

Hopping that you find the issue and help me !

Best regards,

@Vikko151