TextLabel tween not working

Hello,

my tween isn’t working (LocalScript inside a TextLabel)

script.Parent:GetPropertyChangedSignal("Visible").Connect(function()

	local label = script.Parent -- The reference to the label
	local ts = game:GetService("TweenService")

	local tweenI = TweenInfo.new(2) -- you can define different values, the first value is the duration, but look up the documentation for more

	local goals =  {Transparency = 0, Position = UDim2.fromScale(0.5, 0.8), Size = UDim2.fromScale(0.4, 0.8)} -- these are the values that you will end up with when the tween is done, and what is tweening.

	local tween = ts:Create(label, tweenI, goals) -- creating a tween, which can be played, cancelled, has events etc.
	tween:Play() -- playing the tween

	tween.Completed:Connect(function()
		print("The tween is done")

	end)

	
	
	
end)


Do you get any errors from the code?

No, not as far as I can see :frowning: Do you see any issue?

Try printing checkpoints after each step to see where it fails might help.

You used . to connect the event to the function. Replace the first line with this -

script.Parent:GetPropertyChangedSignal("Visible"):Connect(function()

When connecting an event with function, we use :, not a dot.

This should fix your issue.

2 Likes