|
| 10 May 2015 12:17 PM |
while true do wait() if workspace.Finished.Value == true then wait(3) while true do wait() print (script.Parent.BackgroundTransparency) script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency-0.1 if script.Parent.BackgroundTransparency <0 then wait(3) script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency+0.1 if script.Parent.BackgroundTransparency == 1 then break end end end end end
Ive made a big black screen GUI that when activated, turns the screen to pitch black, and then after 3 seconds, slowly becomes transparent again. The only problem is that i cant make it go down to 0, because the number eventually reaches a number smaller than 0.1, so it cant be lowered anymore. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 10 May 2015 01:14 PM |
do something like this
local function Fade(Frame) for T = 1,0,-.1 do wait(.1) Frame.BackgroundTransparency = T end
wait(3)
for T = 0,1,.1 do wait(.1) Frame.BackgroundTransparency = T end
end
Fade(script.Parent) |
|
|
| Report Abuse |
|
|
|
| 10 May 2015 01:18 PM |
| It works! thank you very much :D |
|
|
| Report Abuse |
|
|