TextTransparency Tween not working

My goal: When Tween 1 plays, Tween 2 and 3 will start.
Tween 2 already goes but tween 3 does not.
My code:

local TweenService = game:GetService("TweenService")

local AText = game.StarterGui.ScreenGui.TextLabel

local frame = script.Parent

frame.AnchorPoint = Vector2.new(0.5, 0.5)
frame.Position = UDim2.new(0, 70, 0, 70)
frame.BorderSizePixel = 0
frame.Size = UDim2.new(0, 100, 0, 100)
frame.BackgroundColor3 = Color3.new(0, 0, 0)
-- Set up tweens
local tweenInfo1 = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local tween1 = TweenService:Create(frame, tweenInfo1, {Position=UDim2.new(0.5, 0, 0.5, 0)})
local tweenInfo2 = TweenInfo.new(1.5, Enum.EasingStyle.Quart, Enum.EasingDirection.InOut)
local tween2 = TweenService:Create(frame, tweenInfo2, {Rotation=180})
local tweenInfo3 = TweenInfo.new(0, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local tween3 = TweenService:Create(AText, tweenInfo3, {TextTransparency=(0)})

tween1.Completed:Connect(function()
	tween2:Play()
	tween3:Play()
end)
 
wait(2)
tween1:Play()
tween3:Play()
1 Like

The time for tweenInfo3 is set for 0 seconds, was that a mistake?

I changed it to 1, and it still doesn’t work.

1 Like

I also noticed you are changing the wrong gui. Access the gui through game.players.player.PlayerGui. Everytime the player joins the game, the things in StarterGui are copied into the player’s PlayerGui.

I did what you said

local Players = game:GetService("Players")
local Player = game:GetService("Players")
local AText = game.Players.Player.PlayerGui.ScreenGui.TextLabel

And got the error

  23:36:18.643  Player is not a valid member of DataModel "Untitled Game @ 09 Apr 2022 23:36"  -  Client - LocalScript:4

Player should be the name of the player inside Players. If you are using a local script, you can do this by doing player = Players.LocalPlayer.

1 Like

Oh my mistake, thank you for telling me that.

1 Like


Don’t mind the music, here is the result.

1 Like