generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: GUI Fade in

Previous Thread :: Next Thread 
Danivagyok is not online. Danivagyok
Joined: 21 Mar 2010
Total Posts: 275
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
Danivagyok is not online. Danivagyok
Joined: 21 Mar 2010
Total Posts: 275
15 May 2013 08:54 PM
forever alone );

--end of forum post
Report Abuse
Danivagyok is not online. Danivagyok
Joined: 21 Mar 2010
Total Posts: 275
16 May 2013 04:55 PM
bump PLEASE HELP ME

--end of forum post
Report Abuse
SniperOnTheRoof is not online. SniperOnTheRoof
Joined: 01 Jan 2013
Total Posts: 888
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
Danivagyok is not online. Danivagyok
Joined: 21 Mar 2010
Total Posts: 275
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
Trollarch115 is not online. Trollarch115
Joined: 12 May 2013
Total Posts: 15
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image