|
| 15 May 2013 08:46 PM |
I am trying to script a GUI intro. NOTE: THIS NOT THE WHOLE SCRIPT, IT'S ONLY THE BEGINNING!!! What should happen: ispres is already visible. It waits 5 seconds, turns invisible. Then Code (textlabel) has to fade in, then Red(textlabel) fades in, and then they both fade out. When I tested it, there are no errors in the output! ispress dissapears after 5 seconds as I wanted it to, but then Code would not fade in. Help please?
--Variables
local splash = script.Parent.Background.Splash local loadingtext = script.Parent.Background.Splash.Loading local menu = script.Parent.Background.menu local background = script.Parent.Background local ispres = background.ISPresents local code = background.Code local red = background.Red
local codetrans = code.TextTransparency local redtrans = red.TextTransparency
print("RespawnGui Variables created successfully")
function intro() wait(5) ispres.Visible = false for i = 1, 0, -0.01 do --fade in code wait() codetrans = i end wait(2) for p = 1, 0, -0.01 do --fade in red wait() redtrans = p end wait(5) for i = 0, 1, 0.01 do --fade out code wait() codetrans = i end for p = 0, 1, 0.01 do --fade out red wait() redtrans = i end end
intro()
--end of forum post |
|
|
| Report Abuse |
|
|
|
| 15 May 2013 08:54 PM |
forever alone );
--end of forum post |
|
|
| Report Abuse |
|
|
|
| 16 May 2013 04:55 PM |
bump PLEASE HELP ME
--end of forum post |
|
|
| Report Abuse |
|
|
|
| 16 May 2013 07:27 PM |
I dont know alot about scripting, but some of your waits are empty. If there is no wait, then it just instantly makes and removes the gui. That is also what explains the no-error in the output. TL;DR try putting a value inside the empty wait() |
|
|
| Report Abuse |
|
|
|
| 16 May 2013 07:35 PM |
I already fixed it before you commented, but thanks :3. Say, do you think you could fix this for me? It works fine in test mode, but when I click Play on the webpage, the music doesn't play, and when I reset, the GUI doesn't come up, only the "skiput" button. And THAT doesn't work. Here is the script:
--Variables
splash = script.Parent.Background.Splash loadingtext = script.Parent.Background.Splash.Loading menu = script.Parent menugui = script.Parent.Background.menu background = script.Parent.Background ispres = background.ISPresents code = background.Code red = background.Red codetrans = code.TextTransparency redtrans = red.TextTransparency music = background.Music skipbut = background.skip
print("RespawnGui Variables created successfully")
function menu() ispres:remove() code:remove() red:remove() menugui.Visible = true skipbut:remove() end
function intro() music:Play() skipbut.Visible = true ispres.Visible = true wait(5) ispres.Visible = false for i = 1, 0, -0.01 do --fade in code wait() code.TextTransparency = i end wait(2) print("code fadeIn done") for p = 1, 0, -0.01 do --fade in red wait() red.TextTransparency = p end wait(5) for i = 0, 1, 0.01 do --fade out code + red wait() code.TextTransparency = i red.TextTransparency = i end wait (5) menu() end
skipbut.MouseButton1Down:connect(menu)
intro()
--end of forum post |
|
|
| Report Abuse |
|
|
|
| 16 May 2013 07:38 PM |
@SniperOnTheRoof
Just to clarify, simply putting wait() waits for one frame, it is not instantaneous. Usually that's about 0.03 seconds in Roblox.
~Rainbow Dash is best pony~ |
|
|
| Report Abuse |
|
|