Ayrexic
|
  |
| Joined: 14 Mar 2015 |
| Total Posts: 23 |
|
|
| 05 Apr 2015 06:39 PM |
*Don't mind me, i'm a newbie at scripting*
So, what I want to do is make a main menu GUI to pop up after 20 seconds the player joins the game. What's wrong with this script?
wait (20)
local game.Workspace.["StarterGui"].Menu.MainMenu2.Visible = true local game.Workspace.["StarterGui"].Menu.Play.Visible = true
*The period between game and Workspace is underlined in red* |
|
|
| Report Abuse |
|
|
| |
|
|
| 05 Apr 2015 06:41 PM |
function YouShouldPutANameHere() if game.Workspace.StarterGui.Menu == nil then wait (20) local game.Workspace.StarterGui.Menu.MainMenu2.Visible = true local game.Workspace.StarterGui.Menu.Play.Visible = true end end |
|
|
| Report Abuse |
|
|
Funse
|
  |
| Joined: 11 Jun 2012 |
| Total Posts: 7887 |
|
|
| 05 Apr 2015 06:47 PM |
game.Players.PlayerAdded:connect(function(plr) wait(20) plr.PlayerGui.Menu.MainMenu2.Visible = true plr.PlayerGui.Menu.Play.Visible = true end) |
|
|
| Report Abuse |
|
|
|
| 05 Apr 2015 06:49 PM |
| Funse is a more complicated and more efficient form to do what you wanted. Please use his instead, as like a warrior who lost, I must honor the victor. |
|
|
| Report Abuse |
|
|
Ayrexic
|
  |
| Joined: 14 Mar 2015 |
| Total Posts: 23 |
|
|
| 05 Apr 2015 06:50 PM |
| Yeah, tan, I tried yours and it didn't work. But Funse's version did. Thanks Funse! And thanks for trying tan! |
|
|
| Report Abuse |
|
|
|
| 05 Apr 2015 06:51 PM |
| Yeah, mine was made for a more server-wide than local-wise. Oh well. :| |
|
|
| Report Abuse |
|
|
Ayrexic
|
  |
| Joined: 14 Mar 2015 |
| Total Posts: 23 |
|
|
| 05 Apr 2015 06:53 PM |
| It's aight. Thanks anyways man |
|
|
| Report Abuse |
|
|