Should i use Gui.visible or gui.Enabled to make a gui disapear and apear back? Like an inventory for example

Im just not really sure what to use. Any answer and explenation would be nice

2 Likes

A ScreenGui doesn’t have a Visible property and only has a Enabled property. Whereas a Frame inside of a ScreenGui has a Visible property but not an Enabled property.

Both achieve the same thing it really just comes down to whichever one you prefer.

1 Like

To use .Enabled that is only available for ScreenGuis, you should only have that singular thing you want inside, like for example, a player list and inventory should not be together if you want to use .Enabled, however, you can store multiple Frames of different causes within a ScreenGui if .Visible is used.
Therefore I think you should use the Visible property on Frames and labels etc

1 Like

You should mostly just use .Visible. If you use .Enabled on the ScreenGui then it will disable all other gui elements within it. As an example; If you have a shop frame and an inventory frame contained within the ScreenGui. Once you disable that ScreenGui both the shop frame and inventory frame will be disabled. So again in this case, just use .Visible on the frame which you want to disable.

2 Likes

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