GUI fade doesn't work for some reason

Okay so I’m making a basic GUI fade in, wait, fade out thingie. A very simple code, but after going through the first half of the code, nothing happens.

Am I just missing something obvious?

what about using TweenService?

I didn’t think that I’d have to use tweenservice. I’m more interested in why this script (which should work) doesn’t work.

hmm… what abt getting this one a try?

local repStorage = game:GetService("ReplicatedStorage")
local tweenService = game:GetService("TweenService")

local info = TweenInfo.new(.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, 0)

local textLabel = --locate this in the text object

repStorage.dialogue.OnClientEvent:Connect(function()
      textlabel.Visible = true
      tweenService:Create(textLabel, info, {TextTransparency = .5}):Play()

      wait(2)

      local fadeOut = tweenService:Create(textLabel, info, {TextTransparency = .5})
      fadeOut:Play()

      fadeOut.Completed:Connect(function()
            textLabel.Visible = false
      end)
end)

It worked! I also realized that I could use the following:

for i = 1, .5, -.05 do
  TextTransparency = i
  task.wait(.05)
end
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.