LayerCollector.ResetOnSpawn

ResetPlayerGuiOnSpawn was deprecated however ResetOnSpawn is not a member of LayerCollector, only of ScreenGui. This means that if you attempt to store a BillboardGui or SurfaceGui within the PlayerGui then they will be removed when the player respawns. Ideally, ResetOnSpawn should be a member of LayerCollector, the class which ScreenGui, BillboardGui and SurfaceGui all inherit.

Otherwise, the legacy behavior should be disabled by default for non-ScreenGuis.

User-story remix. As a Roblox developer it is impossible to create GUIs which will persist on respawn in the 3D world.

21 Likes

@TheGamer101

Was there any specific reason this was only implemented for ScreenGui? Just curious. Seems fine to add this IMO.

No reason that I can recall. It seems like a good idea to add this.

5 Likes

The lack of this feature is actually causing a bug in the official Roblox dialogue editor:

https://devforum.roblox.com/t/official-dialouge-breaks-on-loadcharacter/57004

2 Likes

I get really annoyed having to constantly set certain SurfaceGuis when a player respawns. For example, a SurfaceGui in a player’s GUI allows them to view an object archive of things at the place that can be interacted with. When the player respawns, it has to set it up all over again (adorns, creation of labels and whatnot).

This would be an absolute life saver.

We’re still having to rely on ResetPlayerGuiOnSpawn, which has long been deprecated, in order to achieve this.

6 Likes

Still wishing this would be a property of LayerCollector. NPCs in a friend’s project I helped with break for anyone who has LoadCharacter called on their player, due to it using Roblox’s official dialogue editor.

1 Like

This is on the way. I’ll keep you guys posted.

6 Likes

This has been added, but is not live yet. However, anyone in desperate need of it should keep an eye on 329’s release notes if the property isn’t visible in studio yet.

However, if the property is visible in studio you can disable it where needed and it should automatically work when the feature is live. I’m not on a computer yet to see if this is an option. On computer now and confirmed this property isn’t visible in the properties window. However, it seems to be accessible by script in studio, but of course wouldn’t do anything yet as it is not live.

image

If you set it to false by script, by anything I know it should remain false when the feature is live. This means there’s potentially a way to prepare this in your games.


Closed studio and re-opened after setting the property to false. As (probably obviously) expected, it remains false. Guess it’s just a hidden property for now (in studio) like any other hidden property.
image

Oh, that’s interesting. Pretty sure I meant to make that throw an error if you tried setting it before it was live. Oh well, I’ll turn it on soon. Gotta make sure it’s available on mobile first, so your games don’t break if a player is on an old version.

4 Likes

:ok_hand:

No more crowding a LocalScript in StarterGui to set SurfaceGuis/BillboardGuis then.

1 Like

It’s still not live.

Also, is it hidden because it’s not live? Cause it shouldn’t be hidden at all when its fully released IMO.

It’s live now, sorry it took so long!

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.