Tween Not Working

So I use this script, and it will be called by a remote event

local TweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local TransitionEvent = game.ReplicatedStorage.Remotes.TransitionEvent
local ScreenGui = player.PlayerGui.MainGui
local Transition = ScreenGui.Transition

TransitionEvent.OnClientEvent:Connect(function(Text)
	local goal_start = {}
	local goal_end = {}
	local goal_start2 = {}
	local goal_end2 = {}
	Transition.TextLabel.Text = Text
	goal_start.BackgroundTransparency = 0
	goal_start2.TextTransparency = 0
	goal_end.BackgroundTransparency = 1
	goal_end2.TextTransparency = 1
	local tweenInfo = TweenInfo.new(2) -- add N time
	local tween_start = TweenService:Create(Transition, tweenInfo, goal_start, goal_start2)
	local tween_end = TweenService:Create(Transition, tweenInfo, goal_end, goal_end2)
	tween_start:Play()
	wait(7)
	tween_end:Play()
end)


the fade backgroundTransparency does work, but the textTransparency doesnt work, can anyone help me? Thanks!

Tweens take 3 arguments: the instance, the tween info, and the goal table. You’re passing 4.

1 Like

Ouch, then how can I do the background transparency and the text transparency?

Both properties should be in 1 table.

local goal_end = {}
goal_end.BackgroundTransparency = 1
goal_end.TextTransparency = 1
tweenService:Create(Transition, tweenInfo, goal_end)
1 Like

Ah, got it, Idk if 2 statements can be in one table, Thank you so much!

1 Like