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
 

I'm trying to insert a Gui from Lighting into a Character at the start of the game.

Previous Thread :: Next Thread 
XNoBoomX is not online. XNoBoomX
Joined: 08 May 2011
Total Posts: 4731
24 Feb 2012 09:02 PM
startgui = game.Lighting.StartGui

game.Players.PlayerAdded:connect(function(plyr)
startgui:clone().Parent = plyr.CharacterAdded:wait()
end)

I want it to work where, ONLY the first time you enter the game, it inserts a Gui into your PlayerGui. It's for a Gui PlayButton on a main-menu. :P

~{An Intellectual In Love With Bacon}~
Report Abuse
builderman1171 is not online. builderman1171
Joined: 27 Mar 2010
Total Posts: 1595
24 Feb 2012 09:05 PM
Wrong place to add your GUI.

Try this (Might be wrong)

game.Players.PlayerAdded:connect(function(plyr)
if plyr.CharacterAdded then
startgui:clone().Parent = plyr.StarterGui
end
end)

I might have my naming wrong.
Report Abuse
XNoBoomX is not online. XNoBoomX
Joined: 08 May 2011
Total Posts: 4731
24 Feb 2012 09:07 PM
"22:06:45 - StarterGui is not a valid member of Player"

I'm confused...

~{An Intellectual In Love With Bacon}~
Report Abuse
XNoBoomX is not online. XNoBoomX
Joined: 08 May 2011
Total Posts: 4731
24 Feb 2012 09:09 PM
Oh wait... It's PlayerGui. -_-

~{An Intellectual In Love With Bacon}~
Report Abuse
XNoBoomX is not online. XNoBoomX
Joined: 08 May 2011
Total Posts: 4731
24 Feb 2012 09:12 PM
"PlayerGui is not a valid member of Player"

Okay, now I am very confused.

~{An Intellectual In Love With Bacon}~
Report Abuse
XNoBoomX is not online. XNoBoomX
Joined: 08 May 2011
Total Posts: 4731
24 Feb 2012 09:22 PM
Bump. Trying to be patient. ^.^

~{An Intellectual In Love With Bacon}~
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
24 Feb 2012 09:24 PM
startgui = game.Lighting.StartGui

game.Players.PlayerAdded:connect(function(plyr)
startgui:clone().Parent = plyr.PlayerGui
end)
Report Abuse
XNoBoomX is not online. XNoBoomX
Joined: 08 May 2011
Total Posts: 4731
24 Feb 2012 09:27 PM
Darkmist, that didn't work. =/

~{An Intellectual In Love With Bacon}~
Report Abuse
Bushey101 is not online. Bushey101
Joined: 01 May 2010
Total Posts: 3712
24 Feb 2012 10:17 PM
CharacterAdded would make you get the gui when ever you respawn...
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
24 Feb 2012 10:50 PM
@bush, for that you would just place the gui in the StarterGui with no script needed.

@OP, heres the script:

startgui = game.Lighting.StartGui:Clone()

game.Players.PlayerAdded:connect(function(plyr)
repeat wait() until plyr:FindFirstChild("PlayerGui")
startgui:Clone().Parent = plyr.PlayerGui
end)
Report Abuse
saska123456789 is not online. saska123456789
Joined: 14 May 2008
Total Posts: 198
24 Feb 2012 10:55 PM
Wont the gui be invisible and unusable until the player resets?
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