|
| 06 Sep 2017 06:03 PM |
Hi, so I am currrently making a game, and I was wondering how do you make a fade down effect for a TextLabel / ScreenGUI? This is the code im using:
function changeText(Text) game.StarterGUI.GameText.TextG.Text = Text end
I was wondering how since I have seen many people do it, for example [FundUlx] (disorder is a good game) Please tell me with infomation.
~Candygurl2002 -------------- Game Developer |
|
|
| Report Abuse |
|
|
Wrathoxic
|
  |
| Joined: 29 May 2013 |
| Total Posts: 1950 |
|
|
| 06 Sep 2017 06:06 PM |
| ############################## for i=0,1,.1 do wait() tLabel.TextTransparency=i end |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2017 06:09 PM |
from what u provided, there are two options:
one: use coroutines and make a loop to fade out the gui slowly
two: directly apply that loop into the function
local r = 0 repeat
wait(x) r = r + 0.1 directory.transparency = r until r == 1
coroutines are risky with wait() though, so don't use them all the time
also it's a good idea not to direct the script towards startergui, rather the script's parent, which should be the gui
that way, u dont have to access the individual players manually |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
| |
|
|
| 06 Sep 2017 06:56 PM |
for i = 1,0,-1 do script.Parent.Background = i end |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2017 07:33 PM |
(script in PlayerGui in the Frame you want to go poof)
for i = 1,100,1 do script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 1 wait() end
attempt to index global 'soul' (a nil value) |
|
|
| Report Abuse |
|
|
Wrathoxic
|
  |
| Joined: 29 May 2013 |
| Total Posts: 1950 |
|
|
| 06 Sep 2017 07:59 PM |
@SinisterMemories, Won't that make it instantly invisible?
|
|
|
| Report Abuse |
|
|
|
| 06 Sep 2017 08:00 PM |
@gohan what do you mean coroutines are risky with wait()? Could you explain please? I might have to go back and rewrite things.
Šçrätčh ïïś üśëd bÿ łëvëł 17 äñöñ DÖŠ HTMŁ hæx0rs whö üsë ŚQŁ++ ïïńśpëçt ëłæmęñtïïñg |
|
|
| Report Abuse |
|
|
|
| 06 Sep 2017 08:02 PM |
@wrathoxic
oh my mistake I guess I have a musclememory, im so used to using variable + 1.
Here use this
for i = 1,100,1 do script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 1/100 wait() end
attempt to index global 'soul' (a nil value) |
|
|
| Report Abuse |
|
|