|
| 15 Aug 2012 11:11 AM |
I have a script which's function is that when a player connects to the server, the introduction GUI will show up. If player respawns, it won't show up.
The name of the GUI is "Start" and the GUI is inside of the script:
game.Players.PlayerAdded:connect(function(plr) wait(1) script.Start:clone().Parent = plr.PlayerGui end)
The script does not work, when I launch in Play Mode, the Start GUI doesn't show up at all. |
|
|
| Report Abuse |
|
|
UFAIL2
|
  |
| Joined: 14 Aug 2010 |
| Total Posts: 6905 |
|
|
| 15 Aug 2012 11:21 AM |
Read the notice.
http://wiki.roblox.com/index.php/PlayerAdded_(Event) |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2012 12:21 PM |
@UFAIL
How about you read my thread? I said it doesn't work when I launch in PLAY MODE. Which is normal server mode. |
|
|
| Report Abuse |
|
|
MXrcr20
|
  |
| Joined: 01 Oct 2008 |
| Total Posts: 2644 |
|
|
| 15 Aug 2012 12:25 PM |
Is the Gui's parent the script? Is the Gui Visible when it is placed in the PlayerGui? In Solo, does it even make it to the PlayerGui? |
|
|
| Report Abuse |
|
|
FireTG
|
  |
| Joined: 28 Oct 2010 |
| Total Posts: 291 |
|
|
| 15 Aug 2012 12:28 PM |
| "UFAIL2" is right. Those events will not work unless you start a server and a player on that server seperately. |
|
|
| Report Abuse |
|
|
MXrcr20
|
  |
| Joined: 01 Oct 2008 |
| Total Posts: 2644 |
|
|
| 15 Aug 2012 12:29 PM |
| If that's true, how come all my PlayerAdded events work in solo? |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2012 12:35 PM |
@MX
The GUI is visible, and yes its parent is the script. |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 Aug 2012 01:27 PM |
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:wait() script.Start:Clone().Parent = plr.PlayerGui end)
?
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:07 PM |
Guys, it isn't working. Look, I used the script above, and I put in Workspace. I put the GUI named "Start" inside of it. When I go into a server, the GUI shows up, but when I lclick the next button to go to the next frame, it just goes to a black frame. Now, if I put the GUI "Start" in StartGui and then go into a server, everything works perfectly except that the GUI shows up every time a person respawns.
HERE IS THE SCRIPT INSIDE OF THE "NEXT" BUTON:
function openNext() script.Parent.Parent.Visible = false script.Parent.Parent.Parent.Team.Visible = true end
script.Parent.MouseButton1Down:connect(openNext)
|
|
|
| Report Abuse |
|
|
LuaCookie
|
  |
| Joined: 26 Sep 2011 |
| Total Posts: 27 |
|
|
| 18 Aug 2012 07:10 PM |
@roblox - Just for the record, "This item should be used with a Script in order to work as expected in online mode," does not mean that it has to be used in play mode, it means that it can't be run in a LocalScript.
http://wiki.roblox.com/index.php/User:ElectricBlaze |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:12 PM |
| It is inside of a script. -.- |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 07:17 PM |
| Just to make it as clear as I can, it is inside of a NORMAL SCRIPT, NOT LOCAL SCRIPT. |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Aug 2012 08:12 PM |
game.Players.PlayerAdded:connect(function(plr) repeat wait() until plr.PlayerGui and plr.Character script.Start:clone().Parent = plr.PlayerGui end)
~3k posts/20k posts |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 08:26 PM |
game.Players.PlayerAdded:connect(function(plr) repeat wait() until plr:FindFirstChild("PlayerGui") script.Start:clone().Parent = plr.PlayerGui end) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 08:29 PM |
| None of your scripts worked. It just changes to a black frame. It works when it is in StartGui. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 08:35 PM |
| Then you are making a mistake somewhere else, because the startergui clones and parents it the same way we are. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 18 Aug 2012 09:37 PM |
function start(player) local a = game.Workspace.gui:clone() a.Parent = player.PlayerGui end game.Players.PlayerAdded:connect(start) |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2012 12:01 AM |
@DrHax
That script didn't work at all. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Aug 2012 02:27 PM |
Use a normal function like so?
function gui(plr) if plr ~= nil then -- I know this is unnecessary. But I do it anyways. >:P script.Start:Clone().Parent = plr:findFirstChild("PlayerGui") end end game.Players.PlayerAdded:connect(gui) |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2012 03:00 PM |
@Zack
The GUI didn't show u at all. And yes, it is in a script, NOT a LOCAL SCRIPT.
You script didn't work in normal normal mode, nor did it work in solo. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2012 03:03 PM |
Geez, my original one should've worked... Try this and put the GUI in the script:
Game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:wait() repeat wait() until plr:FindFirstChild("PlayerGui") script.Start:Clone().Parent = plr.PlayerGui end)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 10:36 AM |
@Knight
When I click next on my first frame, it switches to a black frame. And the problem is not on my side because I can easily drag the whole GUI into StarterGUI and then all frames are switched to normall. |
|
|
| Report Abuse |
|
|