|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 08 Jun 2013 06:26 PM |
player joins gui fades out after 6 seconds gui never comes back pretty much |
|
|
| Report Abuse |
|
|
| |
|
|
| 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
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 08 Jun 2013 08:27 PM |
| Regular script, put it in Workspace. |
|
|
| Report Abuse |
|
|
|
| 08 Jun 2013 09:43 PM |
| do i insert the name of the gui in the script anywhere? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|