Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 21 Jul 2016 05:32 PM |
I'm making a game and stuff where all the GUIs need to reset upon death except for the chat GUI.
I figured if I put the chat GUI into CoreGui that would solve my problem, but how do I do that? If it isn't supposed to be there then how can I make it not reset?
Since I only want one GUI to not reset by the way, ResetPlayerGuiOnSpawn will not work.
u sicko! |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 21 Jul 2016 05:32 PM |
You could potentially save a copy of this GUI and clone the copy back into the character on every respawn, leaving right where they left off.
|
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
| |
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 21 Jul 2016 05:53 PM |
Ok, that method isn't working. Any other ideas?
u sicko! |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Jul 2016 05:54 PM |
save the messages in a global table then load the messages when the player respawns
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 21 Jul 2016 05:55 PM |
Oh, you mentioned this was a chatgui. Just always save the ChatGui's progress on the server every time it updates with a new message, then clone it into the player on respawn, right? That should work, that's how this works (IIRC): http://www.roblox.com/games/188814899/Custom-Chat-GUI-Example
|
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 21 Jul 2016 06:08 PM |
@Soybeen My GUI takes the messages, sends them to the server, and has the server send them back to each player. Depending on which line is next, the server will put it on that specific line- So I can't do that.
I do like the idea of recloning the GUI but the second time they die this stops working:
local p = script.Parent local player = game.Players.LocalPlayer local humanoid = game.Workspace:WaitForChild(player.Name):WaitForChild("Humanoid") local p2 = nil script.Parent = player humanoid.Died:connect(function() p2 = p:Clone() end) player.CharacterAdded:connect(function(character) humanoid = character.Humanoid p2.Parent = player.PlayerGui script:Destroy() end)
Help?
u sicko! |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 21 Jul 2016 06:22 PM |
Got it to work:
local p = script.Parent local player = game.Players.LocalPlayer local humanoid = game.Workspace:WaitForChild(player.Name):WaitForChild("Humanoid") local p2 = nil local script2 = nil script.Parent = player humanoid.Died:connect(function() p2 = p:Clone() script2 = script:Clone() script2.Disabled = true end) player.CharacterAdded:connect(function(character) humanoid = character.Humanoid p2.Parent = player.PlayerGui script2.Parent = p2 script2.Disabled = false script:Destroy() end)
u sicko! |
|
|
| Report Abuse |
|
|
darthpyro
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 3569 |
|
|
| 21 Jul 2016 06:24 PM |
| Why can't you just edit the chat gui in the StarterGui as well so that everyone always gets an up-to-date copy? |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 21 Jul 2016 06:27 PM |
Set StartGui reset to false
Have a script that clones all other guis to startergui on reset |
|
|
| Report Abuse |
|
|