This item is deprecated. Do not use it for new work.
For thread safety, this property is not safe to read in an unsynchronized thread.
SetTopbarTransparency sets the transparency of the Topbar CoreGui. A value of 0 is completely opaque, and a value of 1 is completely transparent. Values outside of the range [0, 1] are clamped. The default transparency of the topbar is 0.5. The current transparency can be retrieved using the similarly-named
Comparison of Values
The screenshots below show the topbar at 1.0, 0.5 and 0.0 transparency.
This method is often used when re-styling the topbar to match the visual aesthetic of a game. By hiding the topbar, you can create your own custom topbar. See the code samples for an example.
StarterGui/SetCore method with the
TopbarEnabled option allows you to enable/disable the entire topbar and all of its features (player list, health, etc). By contrast, this method only affects how the topbar is displayed.
Custom Topbar Style
This code sample demonstrates how you can create a custom-styled topbar. Paste it into a
LocalScript placed within
StarterPlayerScripts. First, hide the default topbar by setting its transparency to 1 (using
PlayerGui/SetTopbarTransparency). Then, recreate the topbar
Frame and parent it to a
ScreenGui. Set the styles on the Frame to your liking, such as
GuiObject/BackgroundTransparency. Below is a screenshot of what the topbar will look like after this code sample is run.
The following line of code makes the Topbar appear fully opaque.