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 script help

Previous Thread :: Next Thread 
DARKRIDER666 is not online. DARKRIDER666
Joined: 25 Mar 2010
Total Posts: 118
08 Jun 2013 06:06 PM
In my game I want my gui to show up when they spawn then fade out. And if they die, I dont want the GUI to pop up again. Can someone tell me how to do this?
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
08 Jun 2013 06:11 PM
When the player joins, wait for their character, then give them the GUI, like this:

game.Players.PlayerAdded:connect(function(plyr)
while not Workspace:FindFirstChild(plyr.Name) do wait(.1) end
--make GUI fade in
--[[how do we know when it fades out? You decide, click a button, wait a certain amount of time? If it's clicking a button, then this script will end here, but if you just want to wait a certain amount of time, then the fading out can go in this script]]
end)
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
08 Jun 2013 06:14 PM
game.Players.PlayerAdded:connect(function(player)
player.PlayerGui.ScreenGui.Frame.Visible = true
end)

edit line 2 to link to your liking

yes its a simple as that
Report Abuse
DARKRIDER666 is not online. DARKRIDER666
Joined: 25 Mar 2010
Total Posts: 118
08 Jun 2013 06:16 PM
So, just copy and paste that into a script and then put that where? The gui?
And I want to wait a 6 seconds before fading out
Can you help me out a little more
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
08 Jun 2013 06:20 PM
so what you want:

player joins game
gui fades out slowly
gui never ever comes back?
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
08 Jun 2013 06:25 PM
game.Players.PlayerAdded:connect(function(plyr)
local gui = game.Lighting["Name of your gui goes inside these quotes"]:Clone()
while not Workspace:FindFirstChild(plyr.Name) do wait(.1) end
gui.Parent = plyr.PlayerGui.ScreenGui
for i = .9,0,-.1 do
gui.BackgroundTransparency = i
wait(.1)
end
wait(6)
for i = .1,1,.1 do
gui.BackgroundTransparency = i
wait(.1)
end
end)

Just make sure the gui is visible
Report Abuse
DARKRIDER666 is not online. DARKRIDER666
Joined: 25 Mar 2010
Total Posts: 118
08 Jun 2013 06:26 PM
player joins
gui fades out after 6 seconds
gui never comes back
pretty much
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
08 Jun 2013 06:29 PM
@2above looks about right
Report Abuse
DARKRIDER666 is not online. DARKRIDER666
Joined: 25 Mar 2010
Total Posts: 118
08 Jun 2013 06:41 PM
Do I put it in a local script or regular
Where do I put it after
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
08 Jun 2013 08:27 PM
Regular script, put it in Workspace.
Report Abuse
DARKRIDER666 is not online. DARKRIDER666
Joined: 25 Mar 2010
Total Posts: 118
08 Jun 2013 09:43 PM
do i insert the name of the gui in the script anywhere?
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
08 Jun 2013 10:00 PM
Yes, at the top in the variable gui, you will see where to put it
Report Abuse
DARKRIDER666 is not online. DARKRIDER666
Joined: 25 Mar 2010
Total Posts: 118
09 Jun 2013 07:25 PM
I tried putting the GUI in the startgui and it didn't work
Put it in the lighting, didn't show up
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