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 » Scripters
Home Search
 

Re: Allow creation of the PlayerGui object

Previous Thread :: Next Thread 
ihaveamac is not online. ihaveamac
Joined: 27 Jan 2009
Total Posts: 7511
07 Sep 2013 12:04 AM
There's no easy way to create a persistent gui without either preventing the player from dying or some complex script (depends on what you want to save). I've manually inserted my own PlayerGui using insert service, and all of the GUIs placed in it were persistent after respawn. We can't do "Instance.new('PlayerGui', game.Players.LocalPlayer)" though. If there's a reason this wouldn't happen please explain.
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
07 Sep 2013 12:06 AM
because, if we really wanted it to persist after death, we would pull the content of the PlayerGui to a safe place using a script in the player, then put the gui's back when they respawn. You make it sound like its 100 lines, but really, its like 8 lines lol.
Report Abuse
RaceToTheBottom is not online. RaceToTheBottom
Joined: 27 Jul 2013
Total Posts: 169
07 Sep 2013 12:07 AM
[ Content Deleted ]
Report Abuse
ihaveamac is not online. ihaveamac
Joined: 27 Jan 2009
Total Posts: 7511
07 Sep 2013 12:08 AM
@morash wouldn't scripts re-run though? Every place where localscripts run are reset after respawning I believe, that being PlayerGui, Backpack, and the player's character.
Report Abuse
ihaveamac is not online. ihaveamac
Joined: 27 Jan 2009
Total Posts: 7511
07 Sep 2013 12:08 AM
@RaceToTheBottom it would have only certain guis be persistent, and others reset after respawning.
Report Abuse
RaceToTheBottom is not online. RaceToTheBottom
Joined: 27 Jul 2013
Total Posts: 169
07 Sep 2013 12:09 AM
[ Content Deleted ]
Report Abuse
ihaveamac is not online. ihaveamac
Joined: 27 Jan 2009
Total Posts: 7511
07 Sep 2013 12:10 AM
@RaceToTheBottom i don't understand that
Report Abuse
RaceToTheBottom is not online. RaceToTheBottom
Joined: 27 Jul 2013
Total Posts: 169
07 Sep 2013 12:10 AM
[ Content Deleted ]
Report Abuse
usabiker is not online. usabiker
Joined: 08 Oct 2009
Total Posts: 2098
07 Sep 2013 12:12 AM
what does this haf to do with scriptng. lol

"When life gives you lemons, RAGE QUIT LIFE"
Report Abuse
AstoundingPlayer is not online. AstoundingPlayer
Joined: 09 Feb 2011
Total Posts: 15
07 Sep 2013 12:12 AM
get out. now
Report Abuse
ihaveamac is not online. ihaveamac
Joined: 27 Jan 2009
Total Posts: 7511
07 Sep 2013 12:13 AM
@usabiker scripts are reset upon respawn and that can break things if not done properly, and it isn't easy for things like my chat gui.

@AstoundingPlayer no
Report Abuse
AstoundingPlayer is not online. AstoundingPlayer
Joined: 09 Feb 2011
Total Posts: 15
07 Sep 2013 12:14 AM
@ihaveawasteofmonii

yes
Report Abuse
EivkizArysui is not online. EivkizArysui
Joined: 14 Jul 2013
Total Posts: 201
07 Sep 2013 12:17 AM
nah
Report Abuse
AstoundingPlayer is not online. AstoundingPlayer
Joined: 09 Feb 2011
Total Posts: 15
07 Sep 2013 12:17 AM
ahhhhhhhhh ya
Report Abuse
Fluffmiceter is not online. Fluffmiceter
Joined: 28 Jan 2012
Total Posts: 6931
07 Sep 2013 07:29 AM
I don't think the question was very clear. Can you please restate the question... or whatever it is?
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
07 Sep 2013 09:26 AM
Morash is correct. But he failed to say you need to parent a script to nil to stop it being destroyed on respawn.

so

1. Parent to nil
2. Set a global variable to say the restore is working (to avoid multiple reset thingies)
3. Restore the GUIs on characteradded
4. ???
5. Profit
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
07 Sep 2013 09:51 AM
Wait... You mean that setting a scripts parent to a player makes it be reset?...
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
07 Sep 2013 10:16 AM
Never tried Player.

Nil hides your scripts :)
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
07 Sep 2013 10:47 AM
Scripts will not run in the Player object.
Report Abuse
ihaveamac is not online. ihaveamac
Joined: 27 Jan 2009
Total Posts: 7511
07 Sep 2013 12:08 PM
yes, I've tried that before. scripts don't run under the player object
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
07 Sep 2013 12:10 PM
I don't see why you guys are yelling at him. If the gui's are persistant and such, it would be a much simpler method to keep gui's persistant rather than the hacky way we currently have.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
07 Sep 2013 12:12 PM
^ reported for sexism.
You said you guys, implying we are all guys and implying only guys come to this forum

JAYKAY
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
07 Sep 2013 12:20 PM
^
-rants about me only talking about guys-
-doesn't even mention something referring to 'girl'-
girls
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
07 Sep 2013 12:22 PM
gurls gurls gurls gurls
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
07 Sep 2013 12:40 PM
Everyone in this thread as greatly over-thought the process.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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