Ad
Log in to vote
0

Text inside gui doesn't become visible when it's supposed to?

Asked by 14 days ago

In my game I have a gui and a localscript that acts as the main menu and it plays a little camera movement in the script blah blah but then at the end where it's supposed to make text in the gui visible, it doesn't work. Script below.

local camera = game.Workspace.CurrentCamera
gui = game.StarterGui.ScreenGui
title = gui:FindFirstChild("TextLabel")
button1 = gui:FindFirstChild("TextButton")
button2 = gui:FindFirstChild("TextButton2")
button3 = gui:FindFirstChild("TextButton3")

wait(0.1)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = game.Workspace.Cams.StartCam.CFrame
wait(0.1)
gui.Sound:Play()
local TweenService = game:GetService("TweenService")
local TI = TweenInfo.new(12, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0)
local Goal = {CFrame = game.Workspace.Cams.Cam1.CFrame}
local Animation = TweenService:Create(camera, TI, Goal)
local TI = TweenInfo.new(2.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0)
local Goal2 = {CFrame = game.Workspace.Cams.Cam2.CFrame}
local Animation2 = TweenService:Create(camera, TI, Goal2)
wait(4)
Animation:Play()
wait(12)
Animation2:Play()
wait()
--BROKEN TEXT PART BELOW
title.Visible = true
button1.Visible = true
button2.Visible = true
button3.Visible = true
--Fade in title
title.TextTransparency = .9
wait(.08)
title.TextTransparency = .8
wait(.08)
title.TextTransparency = .7
wait(.08)
title.TextTransparency = .6
wait(.08)
title.TextTransparency = .5
wait(.08)
title.TextTransparency = .4
wait(.08)
title.TextTransparency = .3
wait(.08)
title.TextTransparency = .2
wait(.08)
title.TextTransparency = .1
wait(.08)
title.TextTransparency = 0
0
Try to use only Transparency, if its possible BeautifulAuraLover 371 — 14d
0
Use WaitForChild() instead of FindFirstChild() maybe. echobloxia 21 — 14d
0
Also, maybe try setting gui variable to the local player's playergui. echobloxia 21 — 14d

Answer this question