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: Adding a GUI upon spawning

Previous Thread :: Next Thread 
CrakTheRaven is not online. CrakTheRaven
Joined: 25 Dec 2009
Total Posts: 13410
05 Sep 2013 01:50 PM
This is a separate script that I wish to cause a GUI to load into the player upon first joining, but never again after that.

I made this very simple, and yet it doesn't work.

-----
wait(3)
game.Players.PlayerAdded:connect(function(player)
if player ~= nil then
script.Parent:Clone().Parent = player.PlayerGui
print("Loading Sequence")
end
end)

--Output: line 4 PlayerGui is not a valid member of Player
-----

[wait(3) is my substitution for waitfordataready]


Looking for a way to fix/make this more effective.
Report Abuse
Mikesly is not online. Mikesly
Joined: 07 Sep 2007
Total Posts: 4593
05 Sep 2013 01:56 PM
Did you try adding another wait() before line 4?
Report Abuse
CrakTheRaven is not online. CrakTheRaven
Joined: 25 Dec 2009
Total Posts: 13410
05 Sep 2013 01:58 PM
And that did it.

Thanks.
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