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 only shows up when player connects script

Previous Thread :: Next Thread 
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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 is not online. 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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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 is not online. 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 is not online. 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 is not online. 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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
15 Aug 2012 12:35 PM
@MX

The GUI is visible, and yes its parent is the script.
Report Abuse
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
16 Aug 2012 01:26 PM
BUMP
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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 is not online. 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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
18 Aug 2012 07:12 PM
It is inside of a script. -.-
Report Abuse
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
18 Aug 2012 08:11 PM
Bump...
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
DonnyTheDemented is not online. DonnyTheDemented
Joined: 29 May 2010
Total Posts: 1413
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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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
DonnyTheDemented is not online. DonnyTheDemented
Joined: 29 May 2010
Total Posts: 1413
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 is not online. 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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
19 Aug 2012 12:01 AM
@DrHax

That script didn't work at all.
Report Abuse
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
19 Aug 2012 02:23 PM
Bump.
Report Abuse
zackeryjerrypowers is not online. zackeryjerrypowers
Joined: 01 Aug 2008
Total Posts: 1515
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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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
ROBLOXHAMTAH is not online. ROBLOXHAMTAH
Joined: 08 Jul 2008
Total Posts: 9609
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
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