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
|
  |
| 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 |
|
|
| |
|
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
|
  |
| 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 |
|
|
| |
|
ihaveamac
|
  |
| Joined: 27 Jan 2009 |
| Total Posts: 7511 |
|
|
| 07 Sep 2013 12:10 AM |
| @RaceToTheBottom i don't understand that |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
| |
|
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 |
|
|
| |
|
| |
|
| |
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 07 Sep 2013 10:16 AM |
Never tried Player.
Nil hides your scripts :) |
|
|
| Report Abuse |
|
|
|
| 07 Sep 2013 10:47 AM |
| Scripts will not run in the Player object. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 07 Sep 2013 12:40 PM |
| Everyone in this thread as greatly over-thought the process. |
|
|
| Report Abuse |
|
|