Similarly to Modal, anything with a PreserveOnRespawn ancestor would be preserved, and anything with a PreserveOnRespawn descendant would be preserved as well. If there was a ScreenGui with two ScreenGuis inside of it, the main one did not have PreserveOnRespawn enabled, and only one of its children did, then the other one would be removed (and not autorefreshed) on respawn.
[quote] What happens when you set this property in a GUI under the StarterGui? The game begins inserting the same GUI over and over again. Thatâs bad API design over already bad API design. My real beef with this is that itâs a cop-out which assumes that resetting GUIs is even desirable behavior. The answer is that it almost always isnât.
GUIs were created in part to be used by Tools, so GUIs are reset at the same time Tools are; when the character respawns. There are a few flaws with this: one is that Tools can be removed at any time, not just when the character respawns. Another is that Tools must insert their GUIs to a global location in order to render them, which goes against the modularity of Tools.
A good solution is to render GUI objects located under a Tool while the Tool is equipped. Now Tool scripts donât have to worry about keeping track of their GUIs, and now thereâs no reason that GUIs must be reset by default (except for that dang-blasted backwards-compatibility).
The reason one would insist on being able to reset a GUI in general is because theyâre used to the default behavior. But thereâs nothing wrong with making a script do the work. In fact, itâs more correct, because itâs a behavior of your GUI, and behaviors are controlled by scripts. [/quote]
gross :X
Having different âI think players would find it more intuitive to do it this wayâ scenarios in which GUIs can appear will only lead to more bugs and confusion. Already in plenty of my tools I have ScreenGuis that get copied or moved between the PlayerGui, hidden when I need them to, or copied into other playerGuis
Point is, PlayerGui is âthe stageâ. We know anything we put in there gets shown to the player. Any scripts placed here play locally for that player. We can take things out, put things in. Itâs the stage.
Having multiple stages with different behaviours and exceptions only makes things more messy. Thatâs not what weâre asking for.
The originally suggested feature gives us power, and is soooo simple. There is no one who canât wrap their head around it. Itâs less confusing than having GUIâs inside tools automatically shownâŚ
This is seriously mind blowing how everyone isnât collectively on the same page.
It seems like most of the people here never had any experience using GUIs, even on a preliminary basis, even though Iâm certain all of us hasâŚ
!?!?!?!?!
Even if youâre the âYou should be responsible, do your own hacksâ type of person, this feature just makes sense to have
Itâs practically a flag marker for scripts and GUIs that you donât want affected from respawns. In fact Iâd probably use this more often on guis that automatically destroy themselves, so they can finish running whatever script theyâre running and THEN get deleted. (Like, when changing FOV)
Sure, I agree on that note.
I do find it a bit confusing why you think itâs a good idea to implement it this way, but Iâm not making a huge deal out of it.
I feel that this solution, while useful, is not the best way of approaching it. I think it creates more problems than it needs to.
âI do find it a bit confusing why you think itâs a good idea to implement it this wayâ
Current GUIs have to reset on respawn because theyâve always been that way and itâd break stuff to change that
Still need way to preserve some GUIs and leave others to reset (e.g. shop window)
If we just disable resetting for all GUIs then we have to hack together something to reset specific GUIs by adding code to every GUI that needs to be reset (extremely redundant and unnecessary) or add a universal local script that resets GUIs if their name is in a table of names in the localscript (not modular at all and very bad) â you need to hack together something else to get it to do what you want, so that is not an optimal option for this
Only remaining way is to add property to each individual GUI to determine of it resets or not
People whine about stuff like GUIs not being what they should be and stuff completely unrelated to OP and dismiss OP because they donât like the way GUIs work even though that canât be changed
Sure, I agree on that note.
I do find it a bit confusing why you think itâs a good idea to implement it this way, but Iâm not making a huge deal out of it.
I feel that this solution, while useful, is not the best way of approaching it. I think it creates more problems than it needs to.[/quote]
I already have all my guis separated into different ScreenGuis
IntroGui
ShopGui
ChatGui
LeaderboardGui
Some of those ought to persist, some of them should not
ticks true for the ones that should
BAM, everything works
The great thing about this situation is that itâs still possible to change the default behavior through adoption over time. Iâm not saying that it should absolutely happen, but do I think that it would be for the best. It has already been done in Roblox many times already (dynamic lighting, smooth terrain) with graceful results. PreserveOnRespawn would only solidify the problem. If that is added, the default reset behavior cannot be changed without breaking the behavior of PreserveOnRespawn.
I never said the GUIs inside tools would be reset. I said they would either render or not based on whether or not theyâre equipped. No copying or moving of GUIs occurs, tools would simply act like a PlayerGui. This is great because the GUIs are contained, so if the tool is arbitrarily removed, the GUIs go with them.
[quote] ânow thereâs no reason that GUIs must be reset by default (except for that dang-blasted backwards-compatibility).â
Youâre also very wrong on this. If I have a âhack terminalâ GUI pop up whenever I click on a terminal, Iâd want that to go away when the player respawned because theyâre not at the terminal anymore and shouldnât have that GUI. I want to get rid of the NPC shop GUI whenever they reset because theyâre no longer in the shop. I want to reset the red-circle-thing-that-shows-where-you-got-shot-from on respawn (thatâs not related to a tool â itâs related to damage). There are a lot of things aside from tools that need to be reset on respawn. [/quote]
This behavior can easily be handled by a script, which Iâve already made my point on. Character respawning is only one of many cases where a GUI needs to be killed.
[quote] Point is, PlayerGui is âthe stageâ. We know anything we put in there gets shown to the player. Any scripts placed here play locally for that player. We can take things out, put things in. Itâs the stage.
Having multiple stages with different behaviours and exceptions only makes things more messy. Thatâs not what weâre asking for. [/quote]
You already deal with multiple âstagesâ when working with scripts. What Iâm proposing is analogous to this. If I understand correctly, no one has a problem with scripts running in multiple locations, so why should they have problems with GUIs rendering from multiple locations? Not to mention that this already happens anyway (see CoreGui). How is this more messy than requiring tools to inject and manage their GUIs?
Thatâs assuming that not resetting it is the better solution. Youâre forgetting ROBLOXâs target audience for studio. ROBLOX automatically taking care of GUI cleanup helps their largest population of developers, the younger / less-experienced developers. Making it easy to use for everyone aligns with ROBLOXâs principles â phasing out automatically cleaning up GUIs and making it harder for their largest population of developers to use just because a handful of people think resetting any GUI on respawn will end the world goes against that principle.
And no, you canât phase it out to begin with. Thereâs no guarantee that games will even update. The reason dynamic light was able to be added is because thereâs a GlobalShadows property. The reason smooth terrain was added is because you have to intentionally convert your place to smooth terrain. The only way to âphase inâ new behavior is to archive ResetPlayerGuiOnRespawn and display it in the properties window, but as Aurarus said earlier youâre just moving to a different side of hell â it doesnât solve the underlying issue.
I had to go over this with Osyris on Skype too â look closely at the name. Itâs not ResetOnRespawn â itâs PreserveOnRespawn. If you turn off resetting GUIs, nothing is broken. If it has PreserveOnRespawn set to true, it isnât reset as expected. If it doesnât have PreserveOnRespawn set to true it still isnât reset but thatâs also expected because you turned ResetPlayerGuiOnRespawn to false. Thereâs nothing game-breaking about it.
Resetting wasnât what I was referring to. Your belief is that GUIs should not reset automatically and you should manage all of the GUIs manually and reset them to their default states when itâs appropriate, correct? GUIs inside tools goes against that principle. Instead of having one ammo GUI in the PlayerGui and updating the GUIâs ammo box whenever you equip/unequip a tool, youâre copying and pasting the same ammo GUI into each tool. In other words, instead of using one and manually keeping track of and managing GUI states, youâre letting ROBLOX handle state changes automatically + youâll just end up with flicker between the duplicate GUIs when you switch tools, so I donât know why youâd want to do that in the first place.
That is a mess and Iâve already made my point on that as well. Resetting a GUI on respawn or not is related to the GUIs themselves. It belongs in the API and not some ugly, loose script. When you use a feature you shouldnât have to hack together something else just to be able to use it.
[quote] Point is, PlayerGui is âthe stageâ. We know anything we put in there gets shown to the player. Any scripts placed here play locally for that player. We can take things out, put things in. Itâs the stage.
Having multiple stages with different behaviours and exceptions only makes things more messy. Thatâs not what weâre asking for. [/quote]
You already deal with multiple âstagesâ when working with scripts. What Iâm proposing is analogous to this. If I understand correctly, no one has a problem with scripts running in multiple locations, so why should they have problems with GUIs rendering from multiple locations? Not to mention that this already happens anyway (see CoreGui). How is this more messy than requiring tools to inject and manage their GUIs?[/quote]
If I want tools to contain certain ScreenGuis but not show them, now I have to make sure I can place them in areas that wonât get dragged into the stage without my permission.
Also regarding what Echo said, we certainly are past the point of no return, even through very slow adaptation. GUIs have been out for how long now? And their behavior has remained consistent. Guis rely on player characters, waiting for things to settle in, and tagging all sorts of existing objects. Not to mention all the Guis that have scripts/ behaviour that make changes to newly spawned in entities. (Tools, character)
With persistent Guis, so many scripts, free models, and games will become unusable, and will have to be made to ârefreshâ themselves every time player.CharacterAdded() is fired.
PlayerGuis are not better off being entirely persistent, and if they were youâd certainly want a simple âRefreshOnRespawnâ property in ScreenGui. Heck, even making certain games playable depend on being able to reset playergui stuff, since poorly scripted games may run into a bug with guis/ localscripts but simply be refreshed with a character reset.
Thinking back on all my projects, Iâd say over 50% of my screenguis are better off refreshing every time the player respawns, while a select few would be really nice if they could avoid it.
To people resisting this: What is your solution? If you wanted to keep something on your screen (like a chat) even after you die and respawn, what would you do so that it doesnât have to flicker or reload without adding a new special button that makes it not disappear automatically? Shouldnât I be able to tell it whether or not I want it to disappear? Are you going to tell me that I canât?
Most people against this idea have all their Guis persist by disabling the ResetPlayerguiOnRespawn thing or whatever in PlayerGui.
They think you should be in charge of refreshing GUIs yourself and being responsible for it.
We argue that we shouldnât have to use hacky methods. But the resisters seem to also forget that many games already depend on the reset behaviour (and might be better off for it)
This sort of harkens back to the whole FilteringEnabled debate, where the only determining factor for which side youâre on is your experience on the type of games youâve worked on. (Action based/ extremely dynamic games rely on local stuff replicating, vs. More simple games that have relatively simple patterns or straightforward mechanics)
Pls donât remove ResetPlayerGuiOnSpawn
No one is asking for it to be removedâŚ
Ik but just in case.
Sounds like som ppl here donât like GUIs persisting which could mean instant malfunction on all my projects.
Sorry, Echo. But I use Frames to do this exact behavoir, and the 10 lines of code that you need to write do make a module that can do this is really not that much to ask. (Using ResetOnSpawn to false)
[quote] And no, you canât phase it out to begin with. Thereâs no guarantee that games will even update. The reason dynamic light was able to be added is because thereâs a GlobalShadows property. The reason smooth terrain was added is because you have to intentionally convert your place to smooth terrain. The only way to âphase inâ new behavior is to archive ResetPlayerGuiOnRespawn and display it in the properties window, but as Aurarus said earlier youâre just moving to a different side of hell â it doesnât solve the underlying issue.
[/quote]
First, make ResetPlayerGuiOnSpawn a normal property that isnât all weird and hidden. Second, make it on by default for old places, and off by default for new places. This is exactly how GlobalShadows works. GlobalShadows even introduces a behavioral change (i.e. Ambient), which everyone seems to have dealt with just fine.
The next great thing about it is that you donât have to use it. You can continue managing your GUIs in a global way. Combined with the gradual adoption mentioned above, current games can continue functioning the same way, while new or updated games can use either the modular or non-modular system. The point here is to stop forcing Tools to use GUIs in a non-modular way. Make a few Gear and youâll understand why modularity is important for Tools.
The only problem is that current tools may already be storing GUIs as descendants, which means they would start rendering unintentionally. If this turned out to be a major issue, it could be worked around with a simple property in Tools that toggles rendering of GUIs.
You already have to use scripts to handle all the cases where you donât want to display a GUI. What is it about respawning in particular that it needs to be handled by the API and not your script that is already doing almost the same thing?
[quote] PlayerGuis are not better off being entirely persistent, and if they were youâd certainly want a simple âRefreshOnRespawnâ property in ScreenGui. Heck, even making certain games playable depend on being able to reset playergui stuff, since poorly scripted games may run into a bug with guis/ localscripts but simply be refreshed with a character reset.
Thinking back on all my projects, Iâd say over 50% of my screenguis are better off refreshing every time the player respawns, while a select few would be really nice if they could avoid it. [/quote]
Utter nonsense. Why would they be better off? Why should one have to deal with the entire state of a GUI being reset just because the character respawns? It doesnât make any sense. Every time Iâve worked with GUIs, the resetting behavior has been the most obnoxious roadblock Iâve encountered.
[quote] And no, you canât phase it out to begin with. Thereâs no guarantee that games will even update. The reason dynamic light was able to be added is because thereâs a GlobalShadows property. The reason smooth terrain was added is because you have to intentionally convert your place to smooth terrain. The only way to âphase inâ new behavior is to archive ResetPlayerGuiOnRespawn and display it in the properties window, but as Aurarus said earlier youâre just moving to a different side of hell â it doesnât solve the underlying issue.
[/quote]
First, make ResetPlayerGuiOnSpawn a normal property that isnât all weird and hidden. Second, make it on by default for old places, and off by default for new places. This is exactly how GlobalShadows works. GlobalShadows even introduces a behavioral change (i.e. Ambient), which everyone seems to have dealt with just fine.
The next great thing about it is that you donât have to use it. You can continue managing your GUIs in a global way. Combined with the gradual adoption mentioned above, current games can continue functioning the same way, while new or updated games can use either the modular or non-modular system. The point here is to stop forcing Tools to use GUIs in a non-modular way. Make a few Gear and youâll understand why modularity is important for Tools.
The only problem is that current tools may already be storing GUIs as descendants, which means they would start rendering unintentionally. If this turned out to be a major issue, it could be worked around with a simple property in Tools that toggles rendering of GUIs.
You already have to use scripts to handle all the cases where you donât want to display a GUI. What is it about respawning in particular that it needs to be handled by the API and not your script that is already doing almost the same thing?
[quote] PlayerGuis are not better off being entirely persistent, and if they were youâd certainly want a simple âRefreshOnRespawnâ property in ScreenGui. Heck, even making certain games playable depend on being able to reset playergui stuff, since poorly scripted games may run into a bug with guis/ localscripts but simply be refreshed with a character reset.
Thinking back on all my projects, Iâd say over 50% of my screenguis are better off refreshing every time the player respawns, while a select few would be really nice if they could avoid it. [/quote]
Utter nonsense. Why would they be better off? Why should one have to deal with the entire state of a GUI being reset just because the character respawns? It doesnât make any sense. Every time Iâve worked with GUIs, the resetting behavior has been the most obnoxious roadblock Iâve encountered.[/quote]
It keeps it simple for scripts that need to tag the character/ characterâs humanoid/ particular tools in the playerâs backpack.
It also works as a way to get around GUI breaking bugs by refreshing the entire PlayerGui + the scripts in it when the script breaks.
Your proposition is 2 extra properties while weâre asking for just a single one in an object that comes lacking in properties.
Plus, no one is asking for the tool + Gui feature. Cloning a GUI into the PlayerGui is way easier than refreshing variables to the CharacterAdded event.
Youâre also failing to recognize the countless scripts floating around in free models with the playergui reseting in mind.
Additionally, you compare changing the fundamental behaviour to a service most games depend on to an aesthetic feature that is simply an addition.
New games work with dynamic lighting because they see the new problems they are confronted with. This area is dark with this NEW setting? Let me add this NEW light feature here.
Whereas with persistent UI, the bugs will be sprouting randomly and out of nowhere. âMy footsteps donât make sound when I respawn! Help!!!â
Things I learned from this thread:
ResetPlayerGuiOnSpawn should be a visible property for StarterGui.
New games should auto set ResetPlayerGuiOnSpawn to false because it is better practice and allows for more possibilities with games (sounds able to keep playing, a gui to pop up as your character dies, etc), and is also more efficient by not reloading any local scripts within the GUI every character respawn.
Old games should not be messed with so that everything still works.
If your GUI scripts are breaking and thatâs why you want it to reset every character respawn, then that means your scripts should be recoded to not break.
Story for why setting ResetPlayerGuiOnSpawn to false is so powerful:
Last summer I wanted to be able to keep playing a sound in the GUI even if someone died. I didnât want it to reset. I went all hacky to try to make it so the player could never actually die. Changed the humanoid name so they couldnât reset, and it was a disaster game, so that made it soo much harder. If something hit you it would check if the damage would get you below 0 health, and if it did it would make a ragdoll and teleport your real body to the lobby with camera still on the ragdoll for a few seconds. All because I didnât know about being able to set ResetPlayerGuiOnSpawn. When I found out you could have GUIs not reset I was so happy and got rid of all of that hacky workaround stuff.
So when ResetPlayerGuiOnSpawn is not visible by default it is a real bummer for anyone that really wants to have it not reset (and that does not previously know about it)
That was a poor reason that Aurarus brought up. The most relevant reason is that it automatically cleans up the GUI. Have 20 different shops? Now you donât have to loop through your GUI on respawn âif shop1open then removeshop1 elseif shop2open then removeshop2 ⌠elseif shop20open then removeshop20.â Itâs the most user-friendly way possible.
And jesus christ you people â stop attacking the idea of PreserveOnRespawn. How many times have I explained there are more greenhorn scripters on ROBLOX than anyone? It is ROBLOXâs principle to make things easy to use on ROBLOX.
Sound.PlayOnRemove
-Accomplishable with 5 lines of code and scriptable, yet ROBLOX implemented it anyway for ease of use
StarterGui.ShowDevelopmentGui
-Can be accomplished by adding them to a serverscript which clones its children to the playergui on characteradded. ROBLOX added it anyway.
WaitForChild
-Can be accomplished by repeat wait() until parent:FindFirstChild(childName), yet ROBLOX added it anyway
IncrementAsync
-Can be accomplished with UpdateAsync and adding n to oldValue. ROBLOX added IncrementAsync anyway
Seat.SeatOccupant
-Can be accomplished by seat.SeatWeld.Part1.Parent.Humanoid, yet 22 people voted for it on the trello and a staff member said something along the lines of âYou have to know how seats work for that and itâs not very user-friendlyâ and they added it
I donât know what I have to say that it doesnât matter that itâs scriptable (I donât even know why youâre attacking it so viciously just because of that) â ScreenGui.PreserveOnRespawn is more intuitive and can be understood by any level of scripter â even level not-a-scripter., just like SeatOccupant can be used by anyone.
Stop de-railing and attacking the thread. Itâs up to ROBLOX to decide whether this is useful enough to be added / the demand is large enough. Your personal preferences have no impact whatsoever on whether ROBLOX will implement it or not â theyâre irrelevant. Stop posting irrelevant replies to the OP and stay on topic. Stop this completely unwarranted witch hunt on PreserveOnRespawn and let the staff do their job and decide whether itâs useful or not.
I actually never attacked or even mentioned the idea of PreserveOnRespawn, I donât really mind it. I am completely meh about the idea, because I will never use it. If they want to add it I wonât be mad, if they donât add it I wonât be mad. But what I did present in my post is some ideas to make what youâre wanting to do possible. -Being able to stop the reset of GUIs on respawn because of setting ResetPlayerGuiOnSpawn to false.
Question though, if you want to reset some GUIs on respawn, and not others. What are you doing differently to the GUIs that donât reset compared to the GUIs that reset. With ResetPlayerGuiOnSpawn set to false, canât you account for what GUIs need to be visible or invisible in a humanoid.died function?